Why Safari strips out AMP headers in iOS 11

Apple occasionally offers updates to iOS, iPadOS, watchOS, tvOS, and macOS as closed developer previews or public betas. While the betas contain new features, they also contain pre-release bugs that can prevent the normal use of your iPhone, iPad, Apple Watch, Apple TV, or Mac, and are not intended for everyday use on a primary device. That's why we strongly recommend staying away from developer previews unless you need them for software development, and using the public betas with caution. If you depend on your devices, wait for the final release.

iOS 11 will be introducing some changes to the way that the system interacts with Google's AMP (Accelerated Mobile Pages) links. AMP helps mobile pages load very quickly by removing the parts of a web page that slow down loading, and it also wraps the site's URL in a Google domain, which is what you see when you share a Google AMP link.

As noted by MacStories editor Federico Viticci on Twitter, Safari in iOS 11 will strip out Google AMP links, restoring the URL to its original state when sharing a link from Safari or saving it to Safari's Reading List:

To understand what's going on here, there are a couple of questions we need to ask.

What is Google AMP?

Google AMP is a publishing format geared specifically towards the mobile web that aims to speed up web page loading to as close as instantaneous as possible. This is achieved by stripping pages of much of the extraneous clutter that slows them down. Additionally, pages are cached in Google's AMP cache, which the company says allows them to load more quickly.

AMP has been adopted by a number of media outlets, including CNN, The New York Times, and Fox News.

The first thing that should be noted about this is that if you just tap on a Google AMP link in iOS 11, you'll still be taken to the AMP page and see the AMP URL in the address bar. But if you share the link from the Safari share sheet or save it to your reading list, the Google AMP portion of the link will be removed.

As for why, there are a few reasons, but the big one that might surprise you is this: the head of AMP requested this feature himself. Malte Ubl, the creator and technical lead of the AMP project, said as much on Twitter:

Ubl goes on to say that Google's stance is that when possible, browsers should share the canonical (original) links to a page rather than the AMP link. This new feature in iOS 11 makes that possible. Ubl also says that he is advocating for a more generally-available solution. This would likely involve Google taking care of stripping out the AMP ornamentation around a link.

The AMP project has received criticism over its treatment of canonical links in the past, with some publishers complaining that it appears that Google is the source of the links view as AMPs. This can be a problem because links are what the web is all about. Some publishers don't want their identity and brand obfuscated in the name of shaving a few seconds of load time, especially if their mobile site loads quickly already.

No, and it's important to understand that AMP link stripping only happens in relation to Safari. Saving to Reading List or using the share sheet to send the AMP site that you're currently viewing to someone in iMessage will result in AMP link removal. However, if you open Messages and paste the link in an iMessage thread, it will still be sent as a Google AMP link.


If you need to know anything more about Safari's treatment of Google AMP links in iOS 11, tell us in the comments.

Joseph Keller

Joseph Keller is the former Editor in Chief of iMore. An Apple user for almost 20 years, he spends his time learning the ins and outs of iOS and macOS, always finding ways of getting the most out of his iPhone, iPad, Apple Watch, and Mac.