• Resolved wjadevries

    (@wjadevries)


    In the Pagespeed tool (Chrome, but online as well) the caos/657041b3.js?id=G-xxxxx is the largest source blocking the view (59kb -> 450ms in Chrome Lighthouse, 600ms in Pagespeed online).
    This is roughly 1/3 of the total ‘sources blocking view’ time!!

    PS: don’t know why Chrome Lighthouse and Pagespeed insights (online) always display different results, the Chrome version reports better numbers. But both are reporting this about CAOS.

    I’m using the Super stealth upgrade, but changing it to ‘default’ without superstealth doesn’t make any difference.
    When I completely disable the Caos plugin, super stealth and the ffwd license manager my page speed improves significantly (500ms less!).
    I thought you said CAOS didn’t had such a big impact?

    Please help, otherwise I must look for another option.
    Which is a bit of a shame, since I just paid for the Superstealth upgrade ??

    The page I need help with: [log in to see the link]

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Hallo landgenoot! ??

    I will continue in English, since this is a public forum ??

    I checked your site, but it seems you have CAOS disabled at the moment? Since I don’t see any Google Analytics related calls being made.

    Let me break down your question:

    In the Pagespeed tool (Chrome, but online as well) the caos/657041b3.js?id=G-xxxxx is the largest source blocking the view

    Judging from the G-xxxx you’re using GA V4, correct? It’s true that that library is much bigger (Google made it this way, can’t do anything about that, sorry :() than analytics.js. If you don’t need all of Gtag’s features, you could consider switching back to analytics.js (CAOS > Advanced Settings > File to download…) which is about 50% smaller.

    59kb -> 450ms in Chrome Lighthouse, 600ms in Pagespeed online

    450 ms – 600ms is a loooot for such a small file, so I suspect it’s the API call you’re talking about. Did you set Plugin Handling (CAOS’ settings screen > Extensions tab > Plugin Handling) to Super Stealth Upgrade?

    I’m using the Super stealth upgrade, but changing it to ‘default’ without superstealth doesn’t make any difference.

    When you say ‘default’ is this the Snippet Type you’re talking about (under CAOS’ Basic Settings)? If so, try switching it to Asynchronous. That will make the script load non render blocking, so it doesn’t interfere with pageload time.

    Come to think of it, Asynchronous should be the new default setting.

    When I completely disable the Caos plugin, super stealth and the ffwd license manager my page speed improves significantly (500ms less!).
    I thought you said CAOS didn’t had such a big impact?

    Absolutely! CAOS (all my plugins, actually) shouldn’t have such a great impact. If anything, my plugins should speed up loading times!

    If any of the above suggestions didn’t help, please let me know!

    Thread Starter wjadevries

    (@wjadevries)

    Oke, changed the settings as you adviced.
    Plugin handling: Super stealth upgrade
    Enable super stealth mode: yes
    snippet type: async
    File: gtag.js (v4)

    Still 450 ms blocking.
    See graphic here: https://gofile.me/4K120/xsQoFzmHJ

    CAOS is now on, so if you want you can check yourself.

    PS: analytics.js is indeed smaller and faster, but I’m using Google Analytics 4.

    • This reply was modified 3 years, 11 months ago by wjadevries.
    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Ah! I see now.

    There’s a big misunderstanding here ??

    You’re looking at Google Pagespeed’s Potential Savings column, that’s not the actual loading time. That’s an estimate of the potential loading time you can save when you erase the unused JavaScript from that file. Unfortunately, that’s not possible, since it’s a copy of the library Google provided. ??

    To view the actual loading time, use your browser’s Developer Tools:

    – Press F12 in your browser and load one of your site’s pages,
    – Under the Network tab, you should see a list of requests,
    – When you filter by ‘caos’, you can see all files loaded by CAOS, including the renamed gtag.js file, which is called 6da8d082.js in your case,
    – Then in the last column, called Duration (or Duur in Dutch) you’ll see the actual loading time.

    I just looked at your page and I captured the results in this image: https://imgur.com/a/23jjWWY

    – Super-stealth.php: 101ms
    – 6da8d082.js (renamed gtag.js): 85ms
    – Detect: 1,55s

    The Detect call is the API endpoint of Ad Block detection, since you’re using Super Stealth, I suggest disabling this option under CAOS’ settings screen > Extensions > Detect Ad Blockers. On some sites (your site is one of them) calling WordPress’ API from the frontend is slow.

    I noticed a 404 error for linkid.js, this file shouldn’t be loaded, cause it also should be renamed to a randomized string. I forced a cache refresh on that page, by adding a random parameter to the URL (?random=string) and the file wasn’t loaded anymore. So I think you should flush your page cache.

    In short, everything is working as it should. ??

    I hope this makes things more clear! If you have any more questions, let me know!

    Thread Starter wjadevries

    (@wjadevries)

    Oke, disabled Detect Ad Blockers and now the Detect.js is gone.
    Also switched to the asynchonous and analytics.js file, but I don’t see files for that in the Network list.

    I do see a linkid.js 404 message with Initiator 6da8d082.js (which I suppose is CAOS?).
    PS: I don’t have caching enabled in WordPress, so no idea how to get rid of that. And also tried with ?bla=klets parameter after the url, but the linkid.js 404 remains?

    Also: I still don’t understand why Pagespeed is complaining about the blocking source.

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    I’ll research it, it might be a bug. I didn’t see it after adding the parameter, but it seems to persist in my case now, too.

    Do you need to Capture Outbound Links? Because for now you could just disable the Capture Outbound Links option from CAOS’ Extensions settings. That should stop it from loading.

    I’ll research what is causing the linkid.js file to be loaded, when it should be the renamed file.

    Btw. Capture outbound links doesn’t work with Stealth Mode Lite or Super Stealth enabled. ?? I was just browsing through the settings screen and noticed I put that there! As a reminder to myself, and for you for reference. ??

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Are you using CAOS in Compatibility Mode, btw.?

    Thread Starter wjadevries

    (@wjadevries)

    I don’t have ‘Capture outbound links’ enabled, so that’s not it!
    I also don’t use compatibility mode.

    Do you need me to keep CAIS enabled to test it, or can you test yourself? Because I want to disable it as long as this is not solved.

    • This reply was modified 3 years, 11 months ago by wjadevries.
    • This reply was modified 3 years, 11 months ago by wjadevries.
    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Ok, I asked, because I noticed this line of code in your Analytics snippet:

    ga('require', 'linkid', { 'cookieName':'caosLinkid', 'cookieFlags':'samesite=none;secure' });

    This must be a bug. I think I have enough to go on, so you can disable it for now, and I’ll get back to you within the next few days!

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Ah, sorry, I was confused. LinkID is related to the enhanced link attribution setting.

    And indeed, it’s a bug. CAOS is trying to load linkid.js when that setting is enabled, when it should use the rewritten name instead.

    I’ll fix this bug, and for now, disabling Enhanced Link Attributen (in the Extensions tab) will get rid of the 404 error.

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Just wanted to let you know that I fixed the bug. The next release will contain the fix. I’ll release in the next 1-2 days.

    Thread Starter wjadevries

    (@wjadevries)

    Ok, thanks, installed it.
    Currently CAOS is off, but I’d like to use it if it’s not decreasing my Pagerank/speed.
    So now what would be the optimal settings in my case for the different options in CAOS? You know I’ve got the Super Stealth upgrade.
    I’m using WordPress Woocommerce and Google analytics v4 and want to monitor all kind of shopping stats.
    Speed is of high importance.

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Ok, in that case I’d use it combined with WooCommerce Google Analytics Integration, which you can download here.

    After setting up that plugin, activate CAOS and set Advanced Settings > Compatibility Mode to WooCommerce GA Integration.

    For Super Stealth to function as fast as possible, go to Extensions and set Plugin Handling to Super Stealth Upgrade.

    Also disable the other Extensions, like Outbound Link Tracking and Enhanced Link Attribution. Plugins hog performance.

    One last remark, though. Since you’re worried about performance: are you sure you wanna go with GA V4? That library is about double the size compared to analytics.js and will measure just as much, as far as I know.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘caos/xxxx.js?id=xx is slowing down pagespeed’ is closed to new replies.