• Resolved sasquach007

    (@sasquach007)


    Hi,

    I’m working on my site speed with google insights and found that this plugin is causing a lot of render blocking that is hurting performance a lot. Mostly from external CSS and Js from http://cdn.datatables.net. Is there a way to correct this?

    I contacted Cloudflare support and they said to add <script data-cfasync=”false” src=”/javascript.js”></script> in the code so the script gets excluded. However when I checked the plugin code it only has <script type=”text/javascript” so I can’t use that either. What do you recommend and do you think this renderblocking will be fixed in future releases?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Meitar

    (@meitar)

    data-cfasync is specific to CloudFlare’s Rocket Loader product, so that’s not going to become part of this plugin. The preferred standards-compliant equivalent is async, which is a pretty trivial addition. You can use any of the methods described here (such as using the script_loader_tag hook) if you don’t want to submit a patch for me to integrate into this plugin itself when I have the time and desire to do so.

    • This reply was modified 9 years, 1 month ago by Meitar.
    Thread Starter sasquach007

    (@sasquach007)

    I’m not very technical. Not a programmer or anything. How and where would I add that function mentioned in the article you mention to the plugin and then have it called?

    Thread Starter sasquach007

    (@sasquach007)

    Also. I just heard back from Cloadflare support and they suggested doing something like: <script data-cfasync=”false” type=”text/javascript” src=”//cdn.datatables.net/buttons/1.2.1/js/dataTables.buttons.min.js?ver=4.7.3″></script>

    Would that work if I add this to the plugin code or no? I would need a dozen lines like this to get all the problem scripts. I’m not sure if this would actually work though.

    Thread Starter sasquach007

    (@sasquach007)

    I see this was marked resolved, but I’m still having the problem. Can you be more specific about what I need to do. I’m not technical. I need exact steps on how to fix this. Thanks!

    Plugin Author Meitar

    (@meitar)

    If you’re not technical, my exact advice is to hire or recruit someone who is and point them to my earlier post in this thread. You’re not going to get “exact steps” more than that because all the prior steps are just general development practices, not specific steps for this plugin, and this is not a general education forum, it is specifically this plugin’s forum.

    The thread is resolved because the answer has been shared, and a competent (“technical”) administrator can resolve render-blocking JS using the hooks linked. It’s not about whether you resolved the issue on your site. If this is greek to you, get a technical friend to help you out, read the WordPress documentation as already linked, or ask for more geberal help on one of the many other general help forums elsewhere on ww.wp.xz.cn, but not here.

    Thread Starter sasquach007

    (@sasquach007)

    Are you ever gong to fix your plugin so people won’t have to hire coders to fix it to not do render blocking. Having it kill performance is not worth having it installed.

    Plugin Author Meitar

    (@meitar)

    I don’t know. But I do know that the more you ask for this in the entitled-sounding way you are, the less I want to do it. Consider hiring a coder to do that work and then sending me the patch. That way everyone benefits. This is how the plugin exists in the first place. If you don’t appreciate that, I don’t see why I should entertain the idea of doing unpaid labor for someone who speaks nastily to me.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Render blocking Js and CSS from cdn.datatables.net’ is closed to new replies.