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:
Very nice: when sharing AMP pages to iMessage or Reading List, iOS 11 Safari automatically removes AMP's crap from the URL. Go Apple pic.twitter.com/aHgSMcofUvVery nice: when sharing AMP pages to iMessage or Reading List, iOS 11 Safari automatically removes AMP's crap from the URL. Go Apple pic.twitter.com/aHgSMcofUv— Federico Viticci (@viticci) August 23, 2017August 23, 2017
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.
Why does Safari in iOS 11 strip Google AMP links?
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.
Master your iPhone in minutes
iMore offers spot-on advice and guidance from our team of experts, with decades of Apple device experience to lean on. Learn more with iMore!
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:
I personally asked for this feature. I have also asked all other browser vendors, of course.I personally asked for this feature. I have also asked all other browser vendors, of course.— Malte Ubl (@cramforce) August 24, 2017August 24, 2017
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.
Does iOS 11 automatically strip out Google AMP links everywhere?
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.
Questions?
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 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.