I’m working on a client’s store and in theme.liquid, {{ content_for_header }} is commented out.
- When loading the site, most of it loads quickly, but…
- Then there is a 5 second delay where nothing happens and no network requests from my browser to the server are waiting.
- Then most scripts are loaded, including some that really need to be loaded before 5 seconds have passed.
- Strangely, the site has an A on GTMetrix for pagespeed score
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.