iPhone – How to Block ‘GET – On the App Store’ Link Ads in Mobile Safari
adblockiosiphonemobile-safariprivacy
A lot of mobile optimised web sites display App Store links on the top of the page.
How to block this annoying ads? I already run and ad blocker for iOS.
Best Answer
I’m afraid the answer is you can’t block them, at least not through a setting in iOS or a Content Blocker extension for Safari. There are patches available for jailbroken devices though.
I might just be wrong, but other sources (see: blog post, reddit thread) also indicate these banners can’t be easily disabled.
At least Safari does seem to remember that you don’t want to see an ad for a particular app (or on a particular site, I’m not sure) if you close the banner using the “⨯” button on the left.
You only need the first part of this code to do what you ask, but the rest may also be helpful.
// hide the browser chrome
<meta name="apple-mobile-web-app-capable" content="yes" />
//set the phone status bar style; can be grey, black, or black translucent
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
// set the viewport for iOS
<meta content="minimum-scale=1.0, width=device-width, maximum-scale=0.6667, user-scalable=no" name="viewport" />
// set a custom icon for when a user bookmarks the app to the home screen
<link rel="apple-touch-icon" href="/path/to/icon.png" />
You can only turn it on or off, there is no way to set it only to certain sites.
Instead of using the (limited) debug console on the iphone, try using Safari on a desktop and set the user agent to iPhone (From in the Developer Menu, to enable the developer menu, open Safari preferences and choose Advanced where there is a checkbox to enable it).
You should then be able to catch almost all of the console logs, as Safari and MobileSafari are naturally similar. Although there are things you will need to use the iPhone for (like viewport issues)
Best Answer
I’m afraid the answer is you can’t block them, at least not through a setting in iOS or a Content Blocker extension for Safari. There are patches available for jailbroken devices though.
These ads are shown through the “Smart App Banners” feature of Safari. As far as I know, there is no setting in iOS to turn them off. Because of the way Safari Content Blocker extensions work, I also don’t think they can block the HTML tag that tells Safari to display the ad.
I might just be wrong, but other sources (see: blog post, reddit thread) also indicate these banners can’t be easily disabled.
At least Safari does seem to remember that you don’t want to see an ad for a particular app (or on a particular site, I’m not sure) if you close the banner using the “⨯” button on the left.