Hacker News new | ask | show | jobs
by SquareWheel 2555 days ago
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.

4 comments

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.

I believe this is a reference to https://en.m.wikipedia.org/wiki/Embrace,_extend,_and_extingu.... Open source does absolutely nothing to resist this approach.
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.

So what’s your take on Chrome and Safari link preload which are in use by the millions at this exact moment?
That it shouldn't be used on a search engine's results page.

Preload within a domain is reasonable. Preload across domains is, imo, a security concern, but maybe acceptable if the domains are trusted. Preloading untrusted, unknown content is a terrible idea.