Page Speed Insights Ignores CloudFlare's Rocket Loader
See original GitHub issueCloudflare has a tool for website’s dubbed the Rocket Loader. Doc: https://support.cloudflare.com/hc/en-us/articles/200168056-What-does-Rocket-Loader-do-
The tool effectively will optimize the website by renaming all <script> related tags to something like the following.
<script src='/wp-includes/js/jquery/jquery.js' type="text/javascript"></script>
to the following
<script src='/wp-includes/js/jquery/jquery.js?ver=1.12.4-wp' type="4906178bed34d3d402cc70b3-text/javascript"></script>
It also rewrites inline scripts so the opening <script> tag is rewritten to something like:
<script type="4906178bed34d3d402cc70b3-text/javascript">
The concept is quite simple all the JS on the page is effectively deferred including inline JS. This is particularly useful when an application has an in-line script that is dependent on another file loading in a render-blocking fashion.
However, Page Speed Insights ignores this completely.
For instance on my domain: https://www.sertmedia.com/
You can run a test using Page Speed Insights and it will get flagged as JQuery being render-blocking.
However, if you run the same test in Lighthouse (on Chrome Canary)
It is properly detected as no longer being render-blocking. The issue, of course, is this can have a fairly drastic impact on performance between lighthouse local and page speed insights. Also, I tested the site on web.dev as well just for reference and it acts the same as page speed insights.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:7
Top GitHub Comments
We are planing to allow Page Speed Insights to run RocketLoader.
Rocket Loader should run during Page Speed Insights testing.