Skip to content

How and when to block Javascript on your phone


The Internet would look vastly different without JavaScript. This programming language powers things like audio and video players, infinite scrolling, and chat boxes. It lets your favorite websites look the way they do.

That all may sound innocent, but JavaScript has a dark side too. With the tracking features that JavaScript enables, sometimes it’s better to surf the web after blocking JavaScript — especially on your phone.

The purpose of Javascript

With JavaScript, developers can add complex and interactive features to websites. It’s considered one of the fundamental layers of website programming languages, along with HTML and CSS. HTML helps define the basic structure of a site and CSS allows you to add style elements like colors, fonts, and layouts. For any type of dynamic content that goes beyond HTML and CSS, you need JavaScript.

Some examples of what web developers can add to a website using JavaScript include:

  • Content updates
  • Animated 2D or 3D graphics
  • Interactive maps
  • Infinite scrolling
  • Showing or hiding more information
  • Drop-down menus
  • Timer or countdown
  • Image carousel

JavaScript is a powerful scripting language that lets you accomplish almost anything you want to do with your website (it does have some limitations). You may wonder why you should disable it in your browser at all.

Why would you disable Javascript on your phone’s web browser?

Although the point of JavaScript is to improve user experience on websites, it does have some downsides. Website owners use JavaScript to show ads and enable ad tracking. By disabling JavaScript, you can avoid these annoyances while maintaining some of your privacy.

There are a few other pros to disabling JavaScript on your browser as well:

  • Each web browser interprets JavaScript code differently, which can result in inconsistencies with the user interface. With JavaScript disabled, your browser will be able to load web pages accurately, especially older websites.
  • Client browsers can insert malicious code into a site’s JavaScript code, which can directly impact your computer or device if you visit that website.

The downsides to disabling JavaScript

As previously mentioned, JavaScript isn’t all bad. In fact, there are a few disadvantages to disabling it on your browser:

  • Websites can become difficult to read without all the organized formatting and information JavaScript provides.
  • You can lose access to media such as images, videos, and graphics on websites that use JavaScript.
  • JavaScript makes scrolling through information easier so once it’s off, you will have less maneuverability when trying to load more information on a website.

Now that you know the pros and cons of disabling JavaScript on your web browser, it’s up to you to decide what’s best for you.

How to disable Javascript on your phone’s web browser

If you’d rather not let websites track you and don’t mind sacrificing some usability on your phone’s web browser, then you can disable JavaScript on your phone. One thing to note is that the Firefox browser does not allow you to disable JavaScript on Android or iPhone. Safari and Chrome, however, will allow it.


To disable JavaScript on Safari, follow these steps:

  1. Go to Settings.
  2. Tap Safari, then Advanced.
  3. Toggle the switch off for JavaScript.

If you are using Chrome on an iPhone, you cannot disable JavaScript.


To disable JavaScript on Chrome, follow these steps:

  1. Open a new web browser.
  2. Tap the three-dots icon.
  3. Go to Settings, then Site Settings, then JavaScript.
  4. Toggle the switch off for JavaScript.
  5. To allow only certain sites to use JavaScript, tap Add Site Exception just below the JavaScript toggle switch. Type the URL of the website you want to continue to allow JavaScript on, then tap Add

Other options for disabling ad tracking on your phone

If you like your privacy and don’t want ad trackers following you, disabling JavaScript is one way to approach it. But you will sacrifice some usability on many websites, and if that’s bothersome for you, there are other ways to tackle ad trackers on your phone:

  • Turn off your location services
  • Limit personalized ads wherever possible
  • Restrict ad tracking on your online accounts
  • Use a private or incognito web browser

Using your phone without JavaScript

As you can see, disabling and re-enabling JavaScript is very simple to do on iPhone and Android. If you start surfing the web without it and realize that you’d rather not give up usability, you can always turn it back on.

Whether you enable it or not, it’s important to know what JavaScript is and how it works on your computer and phone. Now that you know what this programming language is used for, you can make an informed decision about whether to switch it off or not.

Related Articles

  • All
  • Easy Prey Podcast
  • General Topics
  • Home Computing
  • IP Addresses
  • Networking
  • Online Privacy
  • Online Safety
Stuart Madnick has been in cybersecurity since 1974 and knows a lot about the costs of cyberattacks.

The Cost of Cyberattacks: Minimizing Risk, Minimizing Damage

Most of us view the internet as a useful and benign tool. But in many ways, it’s…

[Read More]

How to Keep Your YouTube from getting Demonetized

You finally did it–you hit all of the markers for acceptance in the YouTube Partner program, and…

[Read More]

How to Stay Out of Facebook Jail

Many of us have been there before–behind the proverbial bars of social media punishment. We’re left shocked…

[Read More]
Lisa Plaggemier's job is to promote cyber security awareness.

Cyber Security Awareness for Everyone

You can do anything on the internet – shop, bank, meet your future spouse, become famous, and…

[Read More]

Cyberbullying Prevention: What Parents Can Do

It’s very easy for anyone to create a fake online profile and say or do mean things…

[Read More]
Lost iPhone

Lost iPhone? If It’s Missing, Look Up to the Cloud for Help.

Here's an important piece of advice: You need to learn what Find My and can do...

[Read More]