Loading of each page in the internet goes from top to bottom. As you may see from your code, the script is written in the beginning of the code. To speed up the loading, you should remove the script from the beginning and put it in the end of your code.
In case if you are not experienced in coding, I wouldn’t recommend you to move code by yourself, as in certain cases that can cause that the Theme would load incorrect. If you need help with this you can drop me a email at firstname.lastname@example.org i will help you to solve this problem.
Anders from the Shopify Social Care team here. Thanks for reaching out today.
Also, thank for you for the input, Victor! The page speed insight that Google provides is great for webmasters who are already experiencing slow load times on their websites. However, if your website does not have any issues with loading, then the page speed insight won't be able to improve your page load times in significant ways.
Have you been noticing any significant slow load times on your end? Most often, it's tied to the size of images and reactive elements on the page.
Anders3 | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Seems like Shopify doesnt have a straight solution for us to leverage browser cache. As a developer who need to pull in a few request, this is essential for my site.
For images, I fetch all the images from the 'assets' folder. I wonder if there is a specific code we can inject to include 'header expiry' on the liquid file.
Looking forward to their reply on this.