How To: Re-Enable Zoom for Websites That Block It in Safari for Your iPhone

Re-Enable Zoom for Websites That Block It in Safari for Your iPhone

While some mobile sites have built-in text-resizing tools, many do not. A lot of those that don't won't even let you pinch-to-zoom. That makes it difficult for people with low vision to read small fonts on their iPhones. In some cases, like with photo captions, even those with perfect eyesight suffer.

Sure, there's the Zoom feature in the Accessibility settings, but it requires three-finger taps and drags to zoom in and move around, and it degrades the fonts of the site you're looking at, not to mention gets disorienting.

Apple did include an option to increase and decrease font size in Safari back in iOS 6 when using Reader View mode, but for some unexplained reason, they scrapped it in iOS 7, even though Reader View remained. This feature will be making a return in iOS 8, but what do you do in the meantime?

With the help of a little JavaScript, I'm going to show you how to enable pinch-to-zoom in Safari for any website, whether they support it or not.

Step 1: Add a Pinch-to-Zoom Bookmark in Safari

On your iPad or iPhone, open up Safari, then go to any website (it doesn't matter which one) and tap on the Share icon at the bottom. In the share menu, tap on Add Bookmark.

Name the bookmark Zoom (or anything else that will help you remember) and make sure that its Location is set to Bookmarks (your default may be "Favorites") for easy access. Save the bookmark.

Step 2: Edit the New Bookmark

When first saving a bookmark, you cannot edit the URL of the page, so that's why we had to save it first. Now, we'll edit it, so go back to Bookmarks, which is accessible from the bottom of Safari.

In Bookmarks, tap on Edit at the bottom-right and select the bookmark you just saved from the list.

Step 3: Replace URL with JavaScript Code

Now, just delete the URL address of the webpage you initially bookmarked and replace it with the following JavaScript snippet.

javascript:document.querySelector('meta%5Bname=viewport%5D').setAttribute('content','width=device-width,initial-scale=1.0,maximum-scale=10.0,user-scalable=1');

Tap Done on the keyboard, then Done once again in Bookmarks to finish the process.

And that's all there is to it. You've now got an easy built-in way to add pinch-to-zoom to any webpage in Safari. Let's test it out now.

Step 4: Pinch-to-Zoom on Zoom-Disabled Sites

Go to a website on Safari that doesn't allow you to zoom in or out, then open Bookmarks and select the Zoom bookmark you just made. You can now zoom in on any article you want!

(1) Un-zoomable. (2) Zoooooom.

If the webpage refreshes for any reason, you'll have to "open" up the Zoom bookmark on it again, as well as on any other webpage you access without zoom function.

For people that have low vision (like me), this is sure to bring some comfort when reading articles with small print that has zoom disabled in Safari.

Optional: Create a Zoom Lock Bookmark

If for some reason you've found the perfect zoom level for an article, you can lock it in place by creating yet another JavaScript bookmark that will prevent user scalability, while retaining scrolling functions.

To do this, repeat Step 1 through Step 3 above, but when copying the JavaScript code, simply change the "user-scalable" value from "1" to either "no" or "0". The latter is shown below.

javascript:document.querySelector('meta%5Bname=viewport%5D').setAttribute('content','width=device-width,initial-scale=1.0,maximum-scale=10.0,user-scalable=0');

Got any other JavaScript tricks for Safari for the iPad or iPhone? Share below!

Just updated your iPhone? You'll find new Apple Intelligence capabilities, sudoku puzzles, Camera Control enhancements, volume control limits, layered Voice Memo recordings, and other useful features. Find out what's new and changed on your iPhone with the iOS 18.2 update.

11 Comments

Wow thank you for this, my accessibility zoom stopped working for some strange reason (iPad 2, IOS 8 with all the updates), so being able to reenable the zoom on web pages is an amazing help. THANK YOU

THANK YOU!

I'm so sick of sites telling me I cannot zoom let alone on poorly designed sites.

Works perfectly, thank you! I can't believe this isn't a native feature on the iPhone in 2015. I had an Android phone over 5 years ago that had this feature built in!

Great walk-through and works perfectly!
Also with iOS9. Thanks

I am able to pinch and zoom in now, but the text does not wrap. In your pictures, it looks like your zoomed in text all fits on he screen. Any suggestions? Thanks

It won't wrap. Looks like he just showed the biggest zoom to see all text in his pic, but if he zoomed in more it would have started cutting text off. But you can still move around the screen to see it all.

Hello this could have been a GREAT solution for my iPad Mini... but it doesn't work. I am running iOS 9.1.
The weird stuff is that my iPhone 6Plus, with the same sites, can pinch-zoom natively...
Any suggestion?

Thanks

Absolutely fantastic - there are so many adverts on sites today the info you want to read is so small it's impossible to read without zooming in - this fix allows you to zoom and remove the adverts - many thanks.

Sadly this didn't work for me.

I'm on a 5S running iOS 8.4

i tried it on chrome, IOS 12 and it worked!

This doesn't seem to work anymore in iOS 13 (or at least not for me...). Using iPhone XS Max running the most recent version of os. Any workarounds or new fixes? Or does this just not work for google images, which is what I'm trying to use it for (since you can no longer pinch to zoom google images in the google image search results pages) ?

Share Your Thoughts

  • Hot
  • Latest