How to understand the output of optimisation tools

Our apps are optimized 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 optimization tools that 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 motive of concern. That’s the reason why in this article we want to explain in detail about those particular messages.

If you’re using an optimization 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 optimization tools are not Javascript errors but general advice on how to improve your page speed.

As an example, please find below some common messages that you might receive from an optimization tool related with our apps.


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's 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 that is cached for 1 hour. You may notice that the optimization tools show the following message after inspecting your site.

Screenshot_20180102_081125.png

The optimization tools recommend to cache resources for at least 1 week but that would cause a lot of problems on a Shopify app. 

The reason is that our app script is updated often to keep pace with new browser versions, with Shopify changes, with theme updates and to introduce new features and bug fixes. Waiting for one week to have this 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 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 won't 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’d like to state again 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.