How to understand the output of optimisation tools

Our apps are optimised to minimise the app loading times by making use of the appropriate caching and compressing mechanisms in order to deliver the best user experience possible.

We are aware that optimisation tools which measure the performance and loading times of a store are often used by merchants and when our apps appear in the results, this is usually a cause for concern. That is the reason why in this article we would like explain in detail about those particular messages.

If you are using an optimisation tool, such as Pingdom https://tools.pingdom.com/ or Google Page Insights at https://developers.google.com/speed/pagespeed/insights/, it is important to note that the messages provided by the optimisation tools are not Javascript errors, but general advice on how to improve your page speed.

As an example, please find below some common messages which you might receive from an optimisation tool related with our apps:

Screenshot_20180102_080347.png

In this case, we do not need that parameter, but Shopify automatically adds it so we cannot remove it from our side. 

However, this is a false positive, as the files will indeed be cached by proxy servers (not shared across different stores, but cached for your customers). 

In the following case, it is true that we could combine those files if this were a custom development.

Screenshot_20180102_080549.png

However, our apps are independent and their files are already compressed and minified. In order to have all possible combinations of our 11 app files compressed and minified we would have to generate 2,048 different files, which would indeed defeat the goal of caching.

For that reason, we think it is acceptable to have a different file for each installed app. 

With regard to caching, each of our apps is comprised of a single Javascript file which is cached for 1 hour. You may notice that the optimisation tools show the following message after inspecting your site.

Screenshot_20180102_081125.png

The optimisation tools recommend to cache resources for at least 1 week but that would cause many issues on a Shopify app. 

The reason is that our app script is updated often to keep pace with new browser versions, Shopify changes, theme updates and to introduce new features and bug fixes. Waiting for one week to have these files updated would cause more harm than good. 

Please note that our Javascript files are compressed, minified and served from a world top CDN. 

On the other hand, each of our apps makes a single AJAX call to gather its preferences. This AJAX response is cached for 1 minute. Caching it longer would mean that, after changing the preferences in the app preferences page, your customer would not see the changes. 

Please note that this AJAX response is very lightweight. 

In the screenshot below we can see a particular message displayed on Pingdom.

Screenshot_20180102_082320.png

This is obviously a glitch  in  the Pingdom tool because more than one resource is served from our servers.

Finally, we would like to restate that the messages provided by the optimisation tools are  generic advice but, after taking a deeper look at the ones related to our apps, they might be considered as false positives.