Apple is making changes to its mobile Safari browser that will make scrolling work smoother across all websites, according to posts on Hacker News and Daring Fireball. Right now, regular pages scroll differently on iOS Safari than sites like Reddit that use AMP (Google’s accelerated mobile pages). That’s because Google uses an iOS technique that allows AMP pages to override the default scrolling, making pages slicker and faster to browse.
The discussion came up, amusingly enough, because Daring Fireball‘s Jon Gruber bashed AMP in a separate post, saying “other than loading fast, AMP sucks.” To make his point, he highlighted Safari’s inconsistent behavior depending on whether pages use AMP encoding or not.
In a discussion on Hacker News, an AMP team member pointed out that “we didn’t implement scrolling ourselves,” but rather just made it so that scrolling operates within the website (in an “overflow”), rather than the browser itself. It actually filed a bug with Apple, asking it to make the scroll inertia for AMP pages the same as for regular sites.
To the team’s surprise, Apple agreed to do the opposite: make built-in Safari scrolling behave as it does with AMP pages. The reason for that, an Apple engineer called OM2 said in the Hacker News discussion, is because Google’s implementation actually matches scrolling behavior elsewhere in iOS. Scrolling as implemented by Apple engineers in Safari, however, is slower — “an intentional decision made long ago,” said OM2. The team decided that original reason is no longer valid, so scrolling in the next version of Safari will match what Google does with AMP.
While that will no doubt sooth Safari users, Apple’s team still isn’t thrilled about how AMP implements scrolling. As OM2 points out, AMP breaks certain key features on Safari, like tapping on the top of the screen to scroll to the top of the page and auto-hiding the top and bottom bars.
And while it saves data and boosts speed, AMP has its share of users and developers who dislike it, not only because of tech issues but the fact that it puts so much control into Google’s hands. As Gruber puts it, “if you are a publisher and your web pages don’t load fast, the sane solution is to fix your fucking website so that pages load fast, not to throw your hands up in the air and implement AMP.”
Via: Daring Fireball
Source: Hacker News