Hacker News new | ask | show | jobs
by lern_too_spel 2556 days ago
> When you use google search with javascript enabled AMP results are both prioritized in the listing and pre-loaded in the background.

Or Bing search or Baidu search or Yahoo! Japan search and so on. The whole point of AMP is that it can be safely preloaded and prerendered, making it faster than any other web page you can create for people coming from a link aggregator. One of the big advantages it has over Facebook Instant Articles or Apple News is that a publisher has to create an AMP page once and then gets to integrate with the multiple link aggregators that support AMP for free. If I want to create my own link aggregator, I don't need a FAANG's clout to get publishers to integrate with me for instant-loading pages — I can use their existing AMP pages.

3 comments

AMP is slower for me because I have to press on my screen twice to get to the actual page I wanted to go to.

Hence AMP requires at least 0.5s between the time I click on a Google link and get to my real destination?

When it doesn't crash in chrome on an android phone from GoogleNews. When that happens only the amp is available and because it didn't render you can't get the actual site...
You could do that with regular HTML. Google crawling everything would easily let them know if a page is light and easy to preload, giving and incentive to web dev to make it so, instead of creating a lock in solution.
> You could do that with regular HTML.

You ignored the safely qualifier. You would deanonymize a user to the publisher and the third party trackers on their page even if the user never clicks through to visit the page.

AMP can be preloaded because it's designed to be preloaded. Regular HTML pages have side effects that can't be accounted for.

lern_too_spel is right. That is literally what AMP was built for.

Let's watch as HN downvotes the correction while upvoting the misinformation in the top-comment.

edit: Downvote and flag. Very disappointing.

Your comment was correctly flagged for breaking the site guidelines. Downvote-baiting is equal parts tedious and supercilious, and is off topic here.

https://news.ycombinator.com/newsguidelines.html

Hi dang,

Thanks for your comment. I wasn't trying to bait any downvotes though. I have no desire to be downvoted. I was frustrating that another user was being incorrectly downvoted and ganged up on simply for explaining how something worked, and I was trying to defend them.

I tried editing the comment before I went to bed to soften it but HN would not allow me to do so. If that were possible, I don't think we'd be having this chat.

Other users in this thread have similarly been flagged simply for explaining how AMP works. I'd ask that you review the other flagged comments in this thread to review if they were done in respect to the site guidelines as well.

Thank you.

It solves the preloading problem just fine. It then goes on to create a crapton of new problems.
This correction does little to refute the original point so...
superkuh said:

>Starting with google: AMP does not actually make loading any faster. Google just uses it's search monopoly to make it seem so.

This is a complete misunderstanding of how AMP works. Google isn't abusing a monopoly to make AMP-pages appear artificially faster; they actually are faster. That's because they're safe to preload by design, as lern_too_spel explained already.

The monopoly comment makes even less sense when you consider that other search engines do the same, and even host their own AMP caches.

Most people here disagree with you, hence why you’ll be down voted. Would AMP be used if it wasn’t for the news carousel - nope - so Google is definitely using their position to embrace and extend open standards.
>Most people here disagree with you, hence why you’ll be down voted.

No doubt. And it's really unfortunate that bias is trumping facts in this case.

>Google is definitely using their position to embrace and extend open standards.

There's nothing wrong with embracing or extending technologies. WebComponents, in this case. But if you're hinting at a third step then I'm sorry but open-source by definition cannot be extinguished.

Do you know the definition of the term “contextomy”?

You’re fixating a point that is not the crux of the argument.

Not to mention, it’s hard to imagine AMP existing if it wasn’t for Google's search monopoly.

It wasn’t until late last year that AMP was really governed by true committee, well after it had been established in Googles image.

But that’s also all tangential to the original comment.

Side effects such as?
Anything that could be affected by prerender[1]. Analytics and statcounters, but also state changes executed by visiting a page.

It'd be quite problematic to load www.example.com/delete-account/confirm, for example.

[1] https://www.w3.org/TR/resource-hints/#dfn-prerender

You are right about analytics, but that's an extremely easy problem to solve - simply disregard stats coming from the search engine bot. In fact both Chrome and Safari currently have a prefetch feature that I think is enabled by default, that's clearly not an issue.

For state, I don't see the connection to AMP here. RFC 7231 which defines the HTTP protocol specifically states that GET is idempotent, and should not cause any state changes in the server. The majority of servers conform to that, and if they don't, it's a bug with worse consequences than messing up prefetch.

Unfortunately I think you're being a little too optimistic. The reality I've seen is that GET is used for all sorts of things, including state changes and irreversible consequences.

Analytics could check for useragent (and probably already does), but it just introduces a lot of noise.

Plus the other concern is that it'd be a huge privacy issue to have analytics being triggered just by performing related searches.

Why does it make sense for Google to control this prefetch mechanism rather than just using a browser built in <link> with prefetch type setup
In what way does google control this prefetch mechanism?

If you mean why does the cache (of which there are 3: google, cloudflare, and Microsoft/Bing) get to control the preloading, the amp limited set of html can be safely cached in it's entirety.

So when I visit a search engine and an amp page is preloaded, it doesn't communicate with that domain.

This ensures that cross domain preloading is possible without leaking my information to any third parties (where third parties in this case is "random sites on the first page of Google").

If link preload was used, any time you made a search, it'd be equivalent to opening all the results on the page, from a tracking perspective. That's pretty awful from the point of view of privacy.

If all the information about us all ultimately percolates out into the environment and everyone who cares knows the size of your bowel movement this morning can we properly say we have improved privacy because they have 2 sources instead of 3 on your morning movement?