Cloudflare\Zone\Settings::change_rocket_loader PHP Method

change_rocket_loader() public method

Automatic Mode: Rocket Loader will automatically run on the JavaScript resources on your site, with no configuration required after turning on automatic mode. Manual Mode: In order to have Rocket Loader execute for a particular script, you must add the following attribute to the script tag: "data-cfasync='true'". As your page passes through CloudFlare, we'll enable Rocket Loader for that particular script. All other JavaScript will continue to execute without CloudFlare touching the script. (https://support.cloudflare.com/hc/en-us/articles/200168056)
public change_rocket_loader ( string $zone_identifier, string | null $value = null )
$zone_identifier string API item identifier tag
$value string | null Value of the zone setting (default: off)
    public function change_rocket_loader($zone_identifier, $value = null)
    {
        $data = ['value' => $value];
        return $this->patch('zones/' . $zone_identifier . '/settings/rocket_loader', $data);
    }