Featured Mobile

How to easily block annoying JavaScript popups on the iPad

How to close rogue JavaScript popup window on iPad Safari
The other day my daughter’s Safari browser on her iPad was stuck because she couldn’t close one of the tabs. It was some bogus web site with a popup message that said she had contracted a virus and to call a certain phone number so they can help troubleshoot.

At first I thought she had gotten some malware or even actually contracted a virus, because we couldn’t close the popup window or the page (tab) in Safari, and we also couldn’t browse to any of the other open tabs. We even tried closing Safari and reopening, and powering down the iPad and back on – still the same issue. It virtually made Safari useless. There was also discussions of taking the device to a repair shop that can Fix iPad and remove those annoying Java scripts. That may have been the most efficient way to fix it. Either way, it’s certainly got me thinking about security while she’s using the iPad, and I’ve found myself reading things like this page showing the best vpn for privacy services out there and I think I might look into getting one for the future so that we will have a little extra protection when using these devices that we have made part of our lives these days. But, in that moment, I was just focused on what we were going to do to get the iPad back up and running.

So, I scoured the internet for a solution, but I was looking at it from the wrong angle. I was searching for the name of the company on the web page in question, and even searched on the phone number listed to see if I could find anything about this unscrupulous company. After some time I finally came across this gem that helped me solve the problem. Here’s the partial explanation:

Mobile Safari will disable the browser controls (new tab, back, etc.) when a JavaScript popup is opened. Unfortunately, this locks the browser until you press “OK” or “Cancel” (if available).

Makes sense, and as I looked at it more closely, I realized the popup only had an OK button but no Cancel button. They obviously programmed the OK button to reload the popup when clicked.

To fix the issue, you need to disable JavaScript temporarily while you go and close the page. You can then re-enable it if you wish.

In general, to improve the Safari web experience, you can look into Apple’s Safari Experimental WebKit Features. These features enable access to forthcoming web tools, proposals for web element improvements, new browser efforts, behavior adjustments, and other Apple development team under-testing features. Although these features are primarily designed for programmers and web developers, general users of Apple devices can also enable some Safari Experimental Features to improve their Safari web app experience.

That being said, let’s look at the steps on iPad to disable JavaScript. I imagine this would also work for the iPhone. Note: You need to first close Safari.

Open the Settings app and click on Safari, then Advanced.

How to close rogue JavaScript popup window on iPad Safari

Uncheck the option next to JavaScript

How to close rogue JavaScript popup window on iPad Safari

Now you can open Safari and close the popup and the tab. Since JavaScript is turned off the script won’t execute to keep opening the popup window.

(Visited 2,353 time, 1 visit today)

About Me

Wendy Neal

Wendy Neal

I am a .NET SharePoint Developer for DMI. I've worked with SharePoint since 2007. I love to share my passion for SharePoint and Office 365 by speaking at various industry and user group events, as well as writing articles for various publications and this blog.   Read More

MCSA Office 365
Top 50 SharePoint Blogs

Buy My Book

Archives

  • 2018 (1)
  • 2017 (1)
  • 2016 (8)
  • 2015 (23)
  • 2014 (20)
  • 2013 (22)
  • 2012 (15)
  • 2011 (13)