Disable JavaScript on your Phone


A couple of years ago I swapped my aging iPhone 5C for an iPhone XR. That “new” iPhone XR was hardly new by 2023, the XR launched in 2018, but I still expected a big improvement over my 2013 5C. Mostly my expectation was correct. Better camera, more storage, etc. but the performance of the web browser left me disappointed. The internet felt slower than what I was used to. Then I remembered: disable javascript!

I’ve been running Safari with JS disabled for years now and I don’t see myself going back. The performance difference, especially on mobile where performance equals battery life, is just too much for me to ignore. Consider this screen capture from the XR:

On the left, cbc news loaded with JS enabled as most people would do. On the right, JS is disabled. For the full effect, start both around the same time.

Sure, some sites are buggy. Some sites just won’t work at all. Even simple things like the links to articles in the video above are not styled correctly with JS disabled. Often site menus don’t work right (or even work at all). Interactive sites, like games, will be completely broken. I understand all these drawbacks and it’s worth the tradeoff for me. On my phone, I want the internet to be fast so I can read the news or occasionally find transit schedules and menus. There is a whole bunch of stuff that comes with JS that I don’t want. By turning off JS, my experience is:

Why do this?

In addition to the reasons above, I have a kind of philosophical objection to the amount of JS on websites. Many popular sites load 10MB, 20MB or even 50MB of JS and that is ridiculous. For comparison, you can write an entire game engine in about 1.5MB of JS. Do websites really need 10x as much code as a video game? In 2016, Ronan Cremin, measured that websites were approaching 2-3MB of JavaScript. It’s amazing how fast we’ve blown past that. And for what purpose? Is Maggie Appleton right that the web is full of trackers and ads and bots? No thanks. I’d rather not use a site than keep JS turned on.

By the way, you may wonder why 50MB is a problem. Modern cell networks are fast and those files will be compressed so we only transfer 5MB, right? Well, the problem with large blobs of JS is that each time I load that site my phone will need to load all 50MB of JS - even if it doesn’t use all of it. That loading time affects battery life and can cause the page to stutter. If the site is rendered server side, each navigation will redo the work to load that identical 50MB file. Wild.

Try it!

Would you like to give a no-JS web a try? It’s not hard to do. On iOS, go to Settings > Apps > Safari > Advanced and toggle the JavaScript checkbox. With iOS 18, you can quickly get back to that screen by going to settings, tapping search, and using the “Safari Advanced” recently used item1. I will occasionally enable JS to view certain sites or log in but it’s rare enough that I don’t find the process cumbersome. The process on android is similar.

Alternatives

Does this sound like too much work? It may be for some. The drawback of sites not working may be a bit much for you and you may find yourself toggling JS on and off too often. That’s okay, there are light weight options out there. Search your app store for browser extensions to block JavaScript. For example, Sheriff looks ideal on iOS but I haven’t tried it.

Conclusion

If you are frustrated with the performance of the web browser on your phone then try disabling JS and see what you think. I’m only one voice but a no-JS mobile web makes the web a much faster and more enjoyable experience for me!

Footnotes

  1. The recently used “Safari Advanced” button is new to iOS 18 and there is a bug where the navigation sometimes fails. Even with the bug, it’s better than iOS 17 where I needed to navigate all those sub menus by tapping.