Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I would add that when pages are built properly they can often be faster than their AMP equivalents.


Not when clicked to from a link aggregator that has its own AMP cache like Google, Bing, or Baidu. In that case, the AMP page will often be prerendered and load instantly.


Isn't that almost guaranteed? As far as I can tell, AMP does three things:

1. It enforces some good practices / forbids certain expensive browser features.

2. It lazily loads images only when they are scrolled in.

3. It fucks up scroll-to-top and other scrolling behavior on iOS.

The first you can do with or without AMP.

The second doesn't cause anything above the fold to load any faster. If anything, you get an additional delay until content shows up when scrolling, because the browser was prevented from continuing to download the other images in the background.

The third regularly causes me to be done with a site in just a few seconds, which I guess is an optimization of some kind.


It's very achievable if you have full control over the site and you know what you're doing... However that's frequently not the case in many large companies.

Many times it just comes down to something along the lines of these pages being run by non-technical folks in sales/marketing that are just click-to-adding widgets/plugins/tags every week without ever removing anything. As a result, you see a lot of very low-hanging fruit make it into the final production site. It's not unheard of to see a website of a household name brand load in multiple versions of the entire jQuery library, for example. I've personally seen a major site from a recognizable brand that otherwise loaded in <1MB, but then proceeded to load Google Tag Manager and pull down an extra 15MB of JS/images.

My point is, I think you're discounting the "AMP enforces some good best practices / forbids some bad patterns" point.


I might be, that's not a world that's familiar to me. But I think if Google had only done that with AMP, no one would have any issue with it.


There's a few other things AMP does, it prevents a lot of repaints by allowing the browser to determine the layout of the page at initial load time. All content areas are predefined, so you won't have things change or your scroll position modified because some advertisement loaded 5 seconds in and suddenly you're scrolled up from where you were.

2 is also a bit of an oversimplification. It'll load images if they're likely to be scrolled to, which I expect is some heuristic based on distance below the fold, and it may cause above the fold content to load faster since it doesn't need to compete with below the fold content (on very fast connections this may not matter, on slower connections it probably does).




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: