Safari Shows the Way to JavaScript Resource Limitation

Published on February 4, 2019
Written by:
Bill Toulas
Bill Toulas
Cybersecurity Journalist

Why get overly occupied with filtering and managing a stream of problems when you can just close the tap? That is probably what several engineers of the WebKit browser engine have thought, deciding to put a limit on the amount of JavaScript that websites are allowed to load. This way, people will be able to enjoy browsing while meeting with fewer ads, as well as getting tracked by less powerful/insightful trackers, leading to a faster and more enjoyable online experience. Many websites right now are filled to the brim with JavaScript, and browsers need to perform heavyweight lifting in order to cope, let alone keep the user safe and secure against all that is running.

This resource limiting idea is just a proposal for now, but it received overwhelming support from many experts in the field already while others highlight the complexity of implementing such restrictions. Possibly, we could see it in a future Safari version in a couple of months, changing the way everything works on the internet, or we may not see it at all. If this limitation applies, website owners will have to get pickier on what JavaScript they use, and developers will have to write much more efficient code so as it maintains functionality while being small in size.

The proposal of Craig Hockenberry goes on to suggest the possibility of striping ad blockers that have strangled small websites by depriving them of revenue that supports their existence, and rely on the JavaScipt limitations to allow sensible ad serving, like in the size of 1MB per page for example. If a website wants to load more complex code to ask for user permissions to access location etc., a prompting dialog could pop-up to ask for the user’s consent to load it.

Chromium developer and Google Engineer Alex Russell have also prototyped a similar idea that sets budgets for JavaScript, CSS, and even fonts and images, aimed at making the browsing faster. The caps set in the proposal include 1 MB sized images, ten connections max, 200 ms duration limit for long-tasks, 100 KB for fonts, and a total script limit of 500 KB (50 KB each). Even if Chrome doesn’t proceed with the "never-slow" mode proposal, Safari holds an adequately large userbase to form a new situation on the internet, forcing websites to change for the better. Even if you don’t use Safari, you will still have benefit from this change.

Are you excited to see what’s in the works by the WebKit team, or do you believe that such limitations will cause more problems than they solve? Let us know where you stand in the comments below, and don’t forget to share your thoughts with our socials community as well, on Facebook and Twitter.



For a better user experience we recommend using a more modern browser. We support the latest version of the following browsers: For a better user experience we recommend using the latest version of the following browsers: