Support » Plugin: AMP »’ defer onload='”

  • Hi folks,

    I’ve installed the plugin but I’m getting one small validation error:

    <!doctype html>
    <html amp lang=”en-US”>
    <meta charset=”utf-8″>
    <meta name=”viewport” content=”width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no”>
    <script src=”’ defer onload=’” async></script>

    If I remove the bold section, my page validates properly. Question is, how can I remove that defer, or stop it being added altogether. I thought it was Cloudflare to begin with but I haven’t been able to fix this, even when applying page rules which turn off Cloudflare functionality on AMP pages.

    I’d really appreciate your help with this!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Mohammad Jangda


    It’s likely being added by Cloudflare like you noted or another similar plugin as the AMP plugin doesn’t include either of them:

    If you have a full page caching plugin like Super Cache or W3TC, you may need to flush the cache as well.

    Thanks! I’ve tried both of those things but unfortunately it’s not changing anything. If my host offers caching, could that cause it?

    Just to update on this… I’ve moved away from Cloudflare and disabled every single plugin, and the issue still persists. I’d appreciate it if anyone is able to shed some light on what the problem may be, please!

    Plugin Author Mohammad Jangda


    If you have any caching plugins in place, you may need to force refresh the cache. If not, it might be something that your host is doing?

    Hi TTYP,

    You may have a plugin or a function (look in your functions.php file) changing the original syntax with a bad one.

    If you have speed optimization plugins, look at their defering part, and disable this for now.

    I have not yet found a way to apply this kind of function/plugin except the AMP pages.

    I’m looking.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘’ defer onload='”’ is closed to new replies.