How to Enable JavaScript on Apple Safari (iPad, iPhone iOS)

Are you having a hard time in trying to turn on JavaScript on your iPad or Apple iPhone device?

JavaScript has evolved into an essential tool that makes the web what it is today. It controls the dynamic elements of web pages, and most websites will fail to run correctly if your Apple Safari browser does not have its JavaScript enabled. Although disabling JavaScript offers browsers faster loading of a website, you should know that it reduces the overall browsing experience on your iPad or iPhone device.

Be it an iPhone 11, iPhone 10 or MacOS device, the steps in this guide will help you learn the simple process and benefits of enabling the JavaScript feature on your Safari browser.

Instructions for Web Developers

You may want to consider linking to this site, to educate any script-disabled users on how to enable JavaScript in six most commonly used browsers. You are free to use the code below and modify it according to your needs.

On enablejavascript.io we optimize the script-disabled user experience as much as we can:

  • The instructions for your browser are put at the top of the page
  • All the images are inlined, full-size, for easy perusing

We want your visitors to have JavaScript enabled just as much as you do!

What Is JavaScript and Why Do I Need It?

JavaScript is a type of code used by web developers to install and establish interactive content on websites – in essence, it allows web pages to dynamically load and send content in the background without page loads on your Apple Safari browser. Generally, JavaScript is used by modern websites to provide various features such as display advertisements – the reason why a small subset of internet users want it disabled.

However, disabling the JavaScript feature on your Safari web browser is much more of a hassle than it seems. If you turn off JavaScript on your browser, many websites won’t function properly. In most cases, you will also be unable to enjoy certain functions or view content that you are accustomed to accessing on JavaScript-based websites.

How to Enable JavaScript on Safari ​

Here’s how to turn on JavaScript on Safari:

1. Select the “Safari” icon on your home screen.

2. Scroll down the Settings page to find the menu item labelled “Safari”, and then select it.

3. Scroll to the bottom of the Safari menu and choose “Advanced” – choosing this will reveal the advanced settings for your Safari browser.

4. On the Advanced menu, find the option for enabling or disabling “JavaScript” for your Safari browser. On finding the JavaScript option, you’ll see a button next to it.

5. Now slide this button to the right to turn on JavaScript on your Safari browser.

6. That’s it! You’ve just enabled JavaScript.

How to Disable JavaScript on Safari ​

Here’s how to turn off JavaScript on Safari:

1. Tap on the “Settings” icon on your home screen.

5. Now slide this button to the left to turn off JavaScript on your Safari browser.

6. That’s it! You’ve just disabled JavaScript. ​

How to Enable JavaScript on Mac

Follow the steps below to activate JavaScript in Safari on Mac:

1. Open the Safari application by clicking on an icon that appears like a compass in your bottom toolbar.

2. Click on the “Safari” menu at the top left corner of the browser.

3. Under the Safari menu, find and click on “Preferences”. This will open a pop-up menu.

4. Move your cursor over to the “Security” tab and select it.

5. Now check the box beside “Enable JavaScript” to turn on JavaScript. Make sure the box is checked.

6. You can now close the “Preferences” window to apply your settings.

7. That’s it! You’ve enabled JavaScript.

8. Restart your browser.

How to Disable JavaScript in Safari on Mac

Follow the steps below to disable JavaScript in Safari on Mac:

2. Click on “Safari” menu at the top left corner of the browser.

3. Under the Safari menu, find and click on “Preferences”. This will open a dropdown menu.

4. Move your cursor over to the “Security” tab and then click on it.

5. Now uncheck the box beside “Enable JavaScript” to disable JavaScript.

7. That’s it! You’ve disabled JavaScript.

8. Restart your browser. 

Apple Safari comes built-in with a JavaScript engine that makes website elements interactive. And while it isn't actually necessary that you enable it to use your Safari browser, it's something that you'll perhaps want to do to enjoy a seamless browsing experience. Otherwise, many websites you visit will appear broken or won't even work.

JavaScript is enabled by default in Apple Safari, but you can verify if yours is active through the Safari tab. To do this, simply click on "Safari" at the top left of your screen to expand the Menu. Next, click on Preferences to reveal the Safari Preferences section. Now that you're in the Preferences section, find and click the "Security" tab to access the "Enable JavaScript" checkbox. If the checkbox has a tick symbol, it means JavaScript is active and working.

Millions of websites use JavaScript to display interactive elements, such as animations, special effects and more. If you browse them with JavaScript disabled in your Apple Safari, then you probably won't have the full experience that you normally would. Some JavaScript-based websites may appear dull or static, while others may not even work at all.

Olumide is a longtime writer who started his career as a digital marketer before transitioning into a copywriter almost eight years ago.

  • – Google Chrome
  • – Internet Explorer
  • – Microsoft Edge
  • – Mozilla Firefox
  • – Apple Safari

How to enable JavaScript in your browser and why http://www.enablejavascript.io/

How to enable JavaScript on your iPad to make websites and videos work properly in Safari

  • You should enable JavaScript on your iPad so that websites you access function properly.
  • If JavaScript is not enabled in your browsers, some websites won't function or will function poorly, and features like animations and videos won't work, so it is important that you know how to turn it on.
  • Visit Business Insider's homepage for more stories .

Most websites are programmed using JavaScript , which is essential for more advanced or complex operations and functions. 

JavaScript can also be used to program, and there are a lot of resources for learning to use JavaScript for amateur programmers up to high-end web developers. 

If JavaScript is not enabled in a browser, your iPad will inhibit functionality on some sites and prevent you from even accessing others. 

That can also limit your ability to access certain features of websites. Some programs and applications from the web, which use JavaScript as well, will also have trouble working.

Check out the products mentioned in this article:

Ipad (64gb), available at best buy, from $799.99, how to enable javascript on your ipad.

1. Tap the "Settings" app.

2. Scroll down until you see "Safari," or any other web browser that you'd like to enable JavaScript in.

3. Tap on the "Safari" icon.

4. Scroll down and tap "Advanced," at the very bottom.

5. JavaScript should be one of the few items you see. Tap on the "JavaScript" toggle so that it turns green.

6. JavaScript is now enabled in Safari. 

7. If you have other browsers you use, you will have to go back, select those in "Settings" and repeat the process for them as well.

Related coverage from  How To Do Everything: Tech :

How to enable javascript in safari on a mac computer to prevent website errors, how to enable javascript on your iphone if it's disabled, to access most websites in a safari browser, how to delete an email account on your ipad in 4 simple steps, how to turn off autocorrect on your ipad in 4 simple steps.

Insider Inc. receives a commission when you buy through our links.

Watch: A professional race car driver turned the luxurious Porsche 911 into a rugged off-road sports car

safari not running javascript

  • Main content

404 Not found

Shortcuts User Guide

  • Intro to Shortcuts
  • Discover shortcuts in the Gallery
  • Run a shortcut from the app
  • Run shortcuts with Siri
  • Run shortcuts from a widget
  • Run a shortcut from Spotlight
  • Launch a shortcut from another app
  • Run shortcuts from Apple Watch
  • Adjust privacy settings
  • Intro to how shortcuts work
  • The flow of content
  • Action connections
  • Control the flow of actions
  • Shortcut completion
  • The Content Graph engine
  • Create a custom shortcut
  • Ideas for custom shortcuts
  • Navigate the action list
  • Order of actions
  • Get actions
  • Transform actions
  • Share actions
  • Test your actions
  • Import shortcuts
  • Intro to editing shortcuts
  • Organise shortcuts in folders
  • Change the layout
  • Reorder shortcuts
  • Rename shortcuts
  • Modify shortcut icons
  • Duplicate shortcuts
  • Delete shortcuts
  • Sync shortcuts
  • Share shortcuts
  • Add import questions to shared shortcuts
  • Intro to variables
  • Variable types
  • Use variables
  • Adjust variables
  • Use list actions
  • Use the Choose from Menu action
  • Use If actions
  • Use Repeat actions
  • Intro to Find and Filter actions
  • Add filter parameters
  • Intro to using prompts
  • Use the Ask for Input action
  • Use the Ask Each Time variable
  • Use the Show Alert action
  • Use the Show Notification action
  • Input types
  • Limit the input for a shortcut
  • Receive onscreen items
  • Advanced Shortcuts settings
  • Run shortcuts from the command line
  • Intro to the Run JavaScript on Web Page action
  • Use the Run JavaScript on Web Page action
  • Intro to URL schemes
  • Open, create and run a shortcut
  • Run a shortcut from a URL
  • Open or search the Gallery from a URL
  • Use x-callback-url
  • Use another app’s URL scheme
  • Intro to web APIs
  • What’s an API?
  • Request your first API
  • Intro to using JSON
  • Parsing JSON
  • Handling lists
  • Get Dictionary Value action
  • Create contacts
  • API limitations
  • Format Date timestamps
  • Dictionaries
  • About date and time formatting
  • Date and time formats
  • Dates as written language
  • Technical standards
  • Custom date formats

safari not running javascript

Use the Run JavaScript on Web Page action in Shortcuts on Mac

Use the Run JavaScript on Web Page action to retrieve specific data from a website, or to modify the contents of a web page.

The Run JavaScript on Web Page action in the shortcut editor.

The Run JavaScript on Web Page action contains a text field where you write your own script. You run the shortcut from the Safari app. Before you can run JavaScript from a shortcut, you must turn on Allow Running Scripts. See Advanced Privacy and security settings in Shortcuts on Mac .

Note: You can also use the Run JavaScript on Web Page action in SFSafariViewController. For more information, see https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller .

Create a JavaScript shortcut

safari not running javascript

Write your script in the text field in the Run JavaScript on Active Safari Tab action.

Important: In your script, make sure you call the completion handler. For more information, see Run JavaScript on Web Page action output .

Add any other actions you want to include in the shortcut.

Tip: To use multiple Run JavaScript on Web Page actions in the same shortcut, make sure each instance of the action has the Safari web page as its input.

safari not running javascript

A new action appears. To ensure that the shortcut appears only in Safari, deselect all input types except “Safari webpages”.

For more information, see Understanding input types in Shortcuts on Mac .

For more information about working with JavaScript in Shortcuts, see Intro to the Run JavaScript on Web Page action in Shortcuts on Mac .

Run the JavaScript shortcut on a web page

In Safari, choose your shortcut from Safari > Services.

Javascript is not working on safari in ios10.2

I am using Iphone 6s and ios 10.2 version. In safari javascript is not working, sometimes its works but most of the time its does not work.

On the login page, javascript validation is not working. I have written a simple javascript code with alert box but the even alert box is not working. On chrome its working.

<script>

alert('hello');

</script>

Even this is not working.

  • Safari Developer Tools

Have you tried using Safari > Developer > Show Error Console to see if Safari is reporting errors. In my experience, Safari is not equal to Chrome.

I am finding that at times, Safari is loading pages so slowly, the script may not be loaded, let alone be called.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

I can not run a javascript on my ios devices.

I am trying to open a javascript embedded email on my safari browser and it does not run. Same file runs on chrome or firefox. I do have javascript enabled on safari.

Here is a simple file that will not run

<!DOCTYPE html>

<html>

<script>

alert("Hello")

</script>

</html>

What I am doing wrong ?

iPad Air, 12

Posted on Dec 2, 2022 3:35 PM

Similar questions

  • Email links try to open in apple mail on iPhone I have gmail set as my default browser on my phone but when I click on an email link in Safari, my iPhone tries to open apple mail (which I don’t want and don’t have!) I want my gmail to open when I click on an email link. How can I make this happen?? 1630 5
  • iOS HTML email slow to load on iPad Air 4 HTML emails, but not plain text emails, are very slow to load on my iPad Air 4 when using the Apple mail app. This happens also on another iPad Air 4 that we have in the house. Almost exactly 30 seconds to load. Almost as though there is a protocol timer that is expiring before loading is allowed. Problem seemed to start when iOS 15 was rolled out but cant say for sure. if I use a third party mail app then the emails load promptly. If I use the Safari browser to access webmail then the emails load promptly. I have an old iPad2 grandfathered on iOS 12 and emails load promptly in the mail app. I have spent may, many hours with Apple tech support trying to solve this problem with no success. The end result was Apple said this was a known problem and they might address it in a future iOS release. Well Apple just released iOS 15.6 but with no fix to this problem. I am tired of waiting for Apple to fix this problem. Has anyone else run into this problem? Thanks in advance. 302 8
  • iOS 13 mobile gmail It seems after upgrade images are not loading in safari in web gmail. On my iMac still display. 375 5

Loading page content

Page content loaded

There are no replies.

iOS 17 Guide: How to Turn On JavaScript on iPhone

Turning on JavaScript on your iPhone is a simple process that can be done in just a few steps. By enabling JavaScript, you’ll have a smoother browsing experience as many websites rely on it to display content properly. In this article, I’ll walk you through the steps to turn on JavaScript in iOS 17.

You can also check out this video about how to turn on JavaScript on iPhone for more on this subject.

Step by Step Tutorial: How to turn on JavaScript on iPhone

Before we dive into the steps, it’s important to understand that turning on JavaScript will allow your iPhone’s browser to execute scripts, which can enhance your browsing experience by allowing for dynamic content and interactive features on websites.

Step 1: Open Settings

Open the Settings app on your iPhone.

When you tap on the Settings icon, you’ll see a list of options for adjusting your iPhone’s various features and preferences.

Step 2: Scroll and tap Safari

Scroll down until you find Safari and tap on it.

Safari is the default web browser for iOS devices, and this is where you’ll find the option to enable JavaScript.

Step 3: Tap on Advanced

Scroll to the bottom and tap on the Advanced menu.

The Advanced menu contains additional settings that can be modified for a more customized browsing experience.

Step 4: Toggle JavaScript on

Find the JavaScript setting and toggle the switch to the green ON position.

By toggling this switch, you are enabling your Safari browser to process and display web pages that use JavaScript.

After completing these steps, JavaScript will be enabled on your iPhone’s Safari browser. This means that when you visit websites that use JavaScript, the content will load and function as intended by the website developers.

Tips: How to turn on JavaScript on iPhone

  • Keep your iOS updated to ensure compatibility with the latest JavaScript versions.
  • If a website isn’t working correctly, check to see if JavaScript is turned on.
  • Remember that some websites may not function properly without JavaScript enabled.
  • Keep in mind that enabling JavaScript might affect battery life due to increased processing.
  • Disabling JavaScript can sometimes be a troubleshooting step for browser issues.

Frequently Asked Questions

What is javascript.

JavaScript is a programming language used to create dynamic content on websites, like interactive forms and animations.

Can I enable JavaScript for specific websites?

No, JavaScript settings on iOS apply to all websites you visit in Safari.

Will enabling JavaScript impact my iPhone’s security?

While JavaScript itself is safe, it can be used in harmful ways by malicious websites. Always ensure you’re visiting secure sites.

Can I still use websites if I don’t enable JavaScript?

Yes, but some features and content may not work properly without JavaScript.

Does enabling JavaScript use more data?

It can, as it allows for more complex and feature-rich content to load.

  • Open Settings.
  • Scroll and tap Safari.
  • Tap on Advanced.
  • Toggle JavaScript on.

Enabling JavaScript on your iPhone can greatly enhance your web browsing experience. As websites continue to evolve and offer more interactive features, having JavaScript turned on ensures that you don’t miss out on the full capabilities of the web. While it’s generally safe to have JavaScript enabled, always be mindful of the websites you visit and practice safe browsing habits. If you ever encounter issues with website functionality, checking your JavaScript settings should be one of your first troubleshooting steps. By following the steps outlined in this article, you can quickly and easily enable JavaScript on your iPhone with iOS 17, ensuring a seamless and dynamic browsing experience.

Matthew Burleigh Solve Your Tech

Matthew Burleigh has been writing tech tutorials since 2008. His writing has appeared on dozens of different websites and been read over 50 million times.

After receiving his Bachelor’s and Master’s degrees in Computer Science he spent several years working in IT management for small businesses. However, he now works full time writing content online and creating websites.

His main writing topics include iPhones, Microsoft Office, Google Apps, Android, and Photoshop, but he has also written about many other tech topics as well.

Read his full bio here.

Share this:

Join our free newsletter.

Featured guides and deals

You may opt out at any time. Read our Privacy Policy

Related posts:

  • How to Enable Javascript on iPhone 14
  • How to Enable Javascript on an iPhone
  • 15 Ways to Fix Safari Not Working on iPhone in 2023
  • How to Disable JavaScript on iPhone 15: A Step-by-Step Guide
  • iOS 17: How to Enable JavaScript on iPhone in Simple Steps
  • iOS 17 – How to Turn Off the iPhone Javascript Setting
  • How to Disable Javascript on iPhone 12: A Step-by-Step Guide
  • Safari History iPhone: How to See It [2023 Guide]
  • Why Can’t I Create a Private Browsing Tab in Safari on My iPhone?
  • 3 iPhone Safari Tips You Might Not Know
  • How to Turn Off Javascript on the iPhone 6
  • 15 iPhone Settings You Might Want to Change
  • How to Turn off Javascript on the iPad 2
  • How to Get Safari Back on iPhone 13
  • How Do I Change Pop Up Blocker iPhone Settings in Chrome?
  • How to Do Private Browsing on iPhone 15: A Step-by-Step Guide
  • How to Clear Cookies on iPhone
  • How to Remove Frequently Visited on iPhone
  • How to Turn on Safari Private Browsing on iPhone: A Step-by-Step Guide
  • How to Block Websites on iPhone 12: A Step-by-Step Guide

COMMENTS

  1. JavaScript is not Working in Safari: 3 Ways to Fix it

    Press Command + , on the keyboard. Go to the Security tab. Check if Enable JavaScript is ticked or not. If not, tick it to enable JS. On iOS: Open the Settings app on iPhone or iPad. Go to Safari and scroll down and go to Advanced. Make sure the switch next to JavaScript is enabled.

  2. How to Enable JavaScript on Apple Safari (iPad, iPhone iOS)

    Click on the "Safari" menu at the top left corner of the browser. 3. Under the Safari menu, find and click on "Preferences". This will open a pop-up menu. 4. Move your cursor over to the "Security" tab and select it. 5. Now check the box beside "Enable JavaScript" to turn on JavaScript.

  3. Website javascript not running on iphone (safari)

    1. There's some workarounds to test iPhone. Try one of this tips. You can rent a mac, use a virtual machine, build a hackintosh or use a developer tool that has resources to test. However, just see the website on iPhone is not enough to solve the problem. If you need to debug, there's a way to do it via Chrome Dev Tools.

  4. How to Enable JavaScript on Your iPhone in Safari

    Open the Settings app on your iPhone. Scroll down until you see "Safari," and tap it. To enable JavaScript, start the Settings app and go to Safari. Dave Johnson/Insider. At the bottom of the page ...

  5. Javascript not working in Safari

    Javascript not working in Safari. After upgrading to 10.7.3 and the new Safari (5.1.3) I now am having trouble with javascript not running whil using Safari. This has occurred on several sites including the this very start a new discussion editor, and is exhibited by click on something and nothing happens! I have tried turning on and off ...

  6. Javascript is not working in Safari on my…

    I'm not a programmer, so can't really help you much beyond basics. If no one else chimes in, reach out to Apple directly for help. Use the Get Support button at the top of this page. Javascript is not working in Safari on my iPad, version 15.5. Anyone know why? . Support.

  7. Use the Run JavaScript on Webpage action in Shortcuts on iPhone or iPad

    Use the Run JavaScript on Webpage action in Shortcuts on iPhone or iPad. Use the Run JavaScript on Webpage action to retrieve specific data from a website, or to modify the contents of a webpage. The Run JavaScript on Webpage action contains a text field where you write your own script. You run the shortcut from the Safari app.

  8. How to Enable JavaScript on an iPad for Web Browsing

    Tap the "Settings" app. 2. Scroll down until you see "Safari," or any other web browser that you'd like to enable JavaScript in. 3. Tap on the "Safari" icon. 4. Scroll down and tap "Advanced," at ...

  9. JavaScript is not Working in Safari: 3 Ways to Fix it

    JavaScript may not work get with Safari for various basis like third-party extensions and browser incompatibility. To problem may pop smooth if you have unlock JS from the Safari menu. Though you pot disable some extensions to solve this problem, you wills also need to follow other methods from this article as well.

  10. Javascript not working when open HTML Fil…

    Javascript not working when open HTML File with Safari in my iPhone. I receive periodically an HTML report by mail or by Telegram. This HTML page uses Javascript to display charts. ... Safari iPhone 7 running iOS 13.3. Safari won't load webpages and when it does load it's just half of the page. I'm having to use google chrome to load ...

  11. html

    0. The JavaScript works fine for me in Safari 5.1.7 on Windows 7, but there are differences with how the header is rendered. This is an issue with CSS however. As best I can tell, there are no defined heights on any of the containing elements. You should define the heights when you can, this will help keep a universal look and feel.

  12. How to resolve JavaScript Cross Browser Compatibility Issues

    Once code has been cleared by Linters, test its cross-browser compatibility by running it on multiple browsers and browser versions on BrowserStack's real device cloud. Use browser developer tools/dev tools that help to debug JavaScript. In most browsers, the JavaScript console will flag and report errors in code.

  13. If Safari isn't loading websites or quits on your iPhone, iPad, or iPod

    Connect to a different network. Try to load a website, like www.apple.com, using cellular data. If you don't have cellular data, connect to a different Wi-Fi network, then load the website. If you're using a VPN (Virtual Private Network), check your VPN settings. If you have a VPN turned on, some apps or websites might block content from loading.

  14. Use the Run JavaScript on Web Page action in Shortcuts on Mac

    Create a JavaScript shortcut. In the Shortcuts app on your Mac, double-click a shortcut. In the shortcut editor, click at the top of the action list, begin typing "Run JavaScript…" in the search field, then double-click the Run JavaScript on Active Safari Tab action to add it to the shortcut editor. Write your script in the text field in ...

  15. iOS 17: How to Enable JavaScript on iPhone in Simple Steps

    Enabling JavaScript on your iPhone running iOS 17 is a straightforward process. Head to the "Settings" app, tap "Safari," and select "Advanced.". There you will find the JavaScript setting. Just switch it on, and voilà, JavaScript is now enabled on your iPhone. After you complete this action, your mobile browser will be able to run ...

  16. debugging

    In Safari Version 13.1.1, when I open the inspector and select Develop > Show JavaScript Console and start entering JavaScript, I don't get any output and the JavaScript is not executed (e.g. an alert does not fire). On any other page, the safari JS console works just fine for me. Here's an example of normal behavior, on stackoverflow.com:

  17. Javascript is not working on safari in ios10.2

    Hi, I am using Iphone 6s and ios 10.2 version. In safari javascript is not working, sometimes its works but most of the time its does not work. On the login page, javascript validation is not working. I have written a simple javascript code with alert box but the even alert box is not working. On chrome its working.

  18. ios

    @Melab: chrome for ios (v 10.3.3) runs bookmarklets both from the address bar, and from the bookmarks menu. To run from the address bar you need to type the name of the bookmarklet and then tap the bookmark suggestion in the dropdown. To run from the Bookmarks menu tap the three dots > bookmarks > tap the boomark name.

  19. I can not run a javascript on my ios devi…

    I can not run a javascript on my ios devices. I am trying to open a javascript embedded email on my safari browser and it does not run. Same file runs on chrome or firefox. I do have javascript enabled on safari. Here is a simple file that will not run. <!DOCTYPE html>.

  20. iOS 17 Guide: How to Turn On JavaScript on iPhone

    Step 4: Toggle JavaScript on. Find the JavaScript setting and toggle the switch to the green ON position. By toggling this switch, you are enabling your Safari browser to process and display web pages that use JavaScript. After completing these steps, JavaScript will be enabled on your iPhone's Safari browser.

  21. html

    Starting a project and off to a bad start. For now, I just want to run a .js file and have it open a browser window. I am using an HTML file to execute the .js via Safari. I checked the console in Safari and it seems to be finding/running the file just fine with no errors. See code below. Any help would be appreciated. JavaScript