How to search in a page or website in Mobile Safari

By

safari search
Mobile Safari's search is good, but hard to use.
Photo: Cult of Mac

Ever since iOS 9, iOS has had a dedicated share extension to search the current web page in Safari. You just hit the sharing arrow, then choose Find in Page on the bottom row of options, and then you can type in your query. It works, and it works well, but it’s a very clunky method for doing something that requires a single keystroke (Command-F) on the Mac.

Today we’ll look at some alternatives for finding text in a web page on iOS, along with a bonus tip for site-wide searches.

Safari’s built-in page search

Mobile Safari has two ways to get to the same page search. I mentioned one above, and it’s the most obvious. It is also the most annoying to use, as you have to tap around finding the correct share-sheet item to invoke.

Probably the quickest way to use Safari's built-in page search is via the URL bar.
Probably the quickest way to use Safari’s built-in page search is via the URL bar.
Photo: Cult of Mac

Another way to access Mobile Safari’s find-in-page feature is to just type your search term into the URL bar, as if you were about to visit another web page, or do a Duck Duck Go search. As you type, Safari will do its usual auto-complete business, but what you may never have noticed is that, at the bottom of the list, there’s a section called On This Page. Here, if Safari has found your search term in the current page, the number of results will be displayed. Tap this result and you’ll be taken to the same search-results view as if you had used the awkward share-sheet version.

From here, tap the tiny arrows in the search bar to page through the results. You can also tap the Done button when you’re done.

Search in a Mobile Safari page with the keyboard

The very best way to search in a Mobile Safari page is to use an attached keyboard. Just hit Command-F like you would on a Mac, and type in your search. This uses the exact same search interface as the non-keyboard method, but it’s way faster to access. Once you have accused the search, you can use the Mac’s Command-G shortcut to jump to the next occurrence of your search term in the page, and Shift-Command-G to jump backwards through the results.

A neat old-school way to search in a page

Safari’s built-in find-in-page tools are great, but they lag behind the Mac in one crucial way. On the Mac, the whole page is dimmed, and every instance of your search term is highlighted. Using Command-G to page through the results highlights each in turn, with your chosen system highlight color.

The Mac's search-in-page is superior.
The Mac’s search-in-page is superior.
Photo: Cult of Mac

Mobile Safari, on the other hand, highlights only the currently-selected instance of your results. But we can fix that by repurposing an old bookmarklet that was written back before Mobile Safari even had a find-in-page function.

This bookmarklet was designed to add a page search to Safari for iPhone. It works by simply highlighting every occurrence of your search term in yellow. To use this bookmarklet, just visit this iMore page from 2012 and drag it to the bookmarks bar on your Mac. That will make it sync to your iPhone and/or iPad. If you don’t use a Mac, then you can do it the hard way.

The other big advantage of this method is that it is easy to use on iOS without tapping into the share menu. You just tap the bookmarklet in Safari’s bookmarks bar, and a box pops up ready for your to type your search term. It’s way better than the built-in method, which shows Apple at its worst, interface-wise: Functions are hidden to make the design appear simpler, but end up making it much more complex.

Site searches

Who are you looking at?
Who are you looking at?
Photo: Cult of Mac

Did you ever get forced to complete a captcha just to perform a search on your favorite internet forum? No more! Here we have a bonus bookmarklet that works like the one above, only it searches the current site, not just the current page. Just tap (or click — it works on Mac too) the bookmark, type your search term, and you’ll be redirected to a site-specific Google search. I use this bookmarklet many times a day. If I remember correctly, I found the bookmarklet here, on CtrlQ.org, amongst several other useful bookmarklets.

Now, the power users amongst you probably already know a few of these tips, especially the built-in features, but you can bet that you have at least a few friends or family members who are frustrated trying to do these searches. Do them a factor and explain the trick to them or — better still — send them this page.