Liquid, JavaScript, themes, sales channels
Hi there,
My website is loading incredibly slow and only soring 15 on Google Page Speed.
I only have access to the admin and no FTP so wondered if anyone can recommend some things I can do to speed up the website.
I am going to be compressing images, but I have seen the following regarding JS:
Is there a way to compress JS through admin alone?
Any other tips on what I can do would be great.
Thanks!
Looks like most of those JS files are from apps. Are there any you can just remove? If not, try turning off the option in the app to have it automatically installed on your site so you can lazy load the JS files on only pages the app is used on.
Hi,
Thanks for the reply.
I see, yes we do have quite a few apps but use most of them.
I have checked a few apps and can't see anywhere to select having the app installed on the website. Is this somewhere else?
Thanks!
Not all apps offer this option. In that case, you can try manually removing it from the {{ content_for_header }} liquid tag. This tag includes the function (asyncLoad) that automatically injects these scripts. You'll have to look in the source code for the exact string to remove. Generally, you could do something like this:
{% if template %}
{{ content_for_header | remove: ', "https:\/\/script-url.com\/path\/to\/file.js"' | remove: ', "https:\/\/xyz.com\/path\/to\/file.js"' }}
{% else %}
{{ content_for_header }}
{% endif %}
Hi @thetoolman,
I agree with previous answers that uninstalling unused apps is a great way to improve performance. However, in your case, since you mentioned that you're using most of your apps you'll likely have to look for other ways to optimize your site. You won't be able to compress most JS scripts coming from 3rd party sources due to not having access to the code files.
You mentioned that you'll be compressing your oversized images - that's a great start 👍
You can also use the Shopify Analyzer to see if your site has any other optimization issues and how to correct them. That's a free tool my team (Speed Boostr) built for the Shopify community. It was built specifically for Shopify sites. The scoring and recommendations are based on data points from the 1,000+ Shopify sites we've optimized.
If you need help with any optimizations or would like a free analysis, you can contact us at https://speedboostr.com/contact. If you prefer to handle it in-house you can use the Shopify Analyzer and follow our complete Shopify optimization guide: https://speedboostr.com/shopify-optimization.
Best of luck!
If you can't completely remove an app, then lazy loading the scripts that are currently automatically injected on every page will both speed up the initial load time and you can still have the features of the app. The biggest issue is that all this stuff is trying to run on load of the page when it probably doesn't need to.
Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024Digital marketers and app developers have tracked activity in apps and websites for yea...
By Ollie Mar 13, 2024February was an exciting month with Shopify Editions, informative webinars, and more! F...
By JasonH Mar 7, 2024