At RebelMouse, we're constantly iterating on our platform to maximize the performance of our websites in order to keep up with the latest standards from Google's PageSpeed Insights tool.
With this element, you can add:
- A friendly name
- Priority for loading (standard or non-standard)
Here's what the JS element looks like:
Standard vs. Non-standard Priority
So, when do you choose standard priority versus non-standard? Non-standard priority tasks will be executed in the stack as soon as possible. Non-standard priority is best suited for small tasks that do not affect PageSpeed scores too much, such as small snippets. Another use-case for non-standard is when you want the script to be at the top of the page.
By contrast, standard priority should be used for heavier tasks that can be delayed after the page initially loads. Ads are a good example of something you want to place in a standard-priority queue.
In summary, standard-priority tasks do not affect PageSpeed scores because they're delayed until after a user begins interacting with a page. So this methodology is great when you want to improve the speed of your page with consideration for how to load those specific tasks. The downside is, of course, that the tasks (e.g., ads) will be delayed when loading the page.
For most cases, we recommend using the standard priority so that PageSpeed scores are not affected.
For one of our clients, they had an article with a mobile PageSpeed score of only 18 before any optimization: