shopify_v2.js) thereby considerable improving the overall loading speed of your shop. Additionally, there are no database calls to fetch review content, as this is saved inside Shopify metafields.
- our own jQuery (this alone accounts for half of our file's size but we find jQuery is too useful to be removed)
- our special lightweight font for rating stars
- our CSS styles
Our JS file is 80.5KB after compression (before compression it's 210KB, but for network loading performance the size prior to compression is irrelevant). While this by itself is a relatively large file size (it's ~2 times as large as jQuery-1.9.1.min, which is ~36.5KB after compression), it's the only request that we make.
Other review apps usually make 4 separated requests for the above items (some even unnecessarily load the whole FontAwesome library). Most apps also make database requests to fetch their review content. Judge.me stores review content inside Shopify metafields, embedded in your page in order not to make extra database requests. Loading review content from Shopify metafields has been part of the free plan since the Judge.me widget version 1.0.
Why do you prefer one large requests to multiple small requests?
One large request outperforms many small requests (e.g. 1 request of 50KB is faster than 5 requests of 10KB) because most of the time spent for a request is for overhead procedures, such as looking for a server, initiating SSL handshake, server processing.
Does Google PageSpeed deduct points for large JS files?
Google PageSpeed does not deduct any point just because our JS file is large. It only does so if the JS file is not compressed, or not minified, or not loaded asynchronously, or not cached. However, our JS file does not have any of those issues.
Why is jQuery added to the Judge.me JS file?
We add jQuery for multiple reasons:
- make sure we use this particular version of jQuery
- control the quality of jQuerry. Some themes overwrite portions of the jQuerry they load and sometimes they may not even load it completely.
- make sure jQuery is loaded before our JS and that it does not have any errors. We don't want to depend on the theme developer for this.
I have further questions/ideas/concerns about page speed optimization
Please reach out to us via email@example.com, we love to discuss how to improve our users' shop performance.