A space to discuss online store customization, theme development, and Liquid templating.
I'm working on a client's store and in theme.liquid, {{ content_for_header }} is commented out.
When I uncomment {{ content_for_header }}, the delay disappears and everything loads in a reasonable time. However, the the GTMetrix score goes down to B and it shows a longer time to load the page. It's like something is adding a 5 second delay to make pagespeed tools like GTMetrix think the page finished loading already and gives a better score... THEN after that, all those async scripts get loaded.
Anyone encounter similar? I have never encountered this strange 5 second delay.
I've seen some dodgy speed tricks using loading delays to make a page appear faster to testing engines. Perhaps that's the case here with something you've inherited from a previous dev - worth looking at what scripts are actually loading early to see if one of those is doing something weird. Without seeing your example it's going to be lots of guessing and conjecture like this, so won't be a really helpful convo.
Are you able to share examples?
Hey Jason, thank you for the insights - that's what I feared. Client can't get details from the "pagespeed expert" he hired on Fiverr for this. So I'm searching around the theme code for any such delays and will report back here for others' reference