Hacker News .hnnew | past | comments | ask | show | jobs | submitlogin

One detail which I feel must be mentioned: if you block `ampproject.org` by default -- directly or by blocking 3rd-party javascript by default, -- you will be "punished" with a 8-second delay before the page becomes visible.

This is an entirely artificial delay, implemented through an inlined style CSS animation in AMP-based pages:

    animation:-amp-start 8s steps(1,end) 0s 1 normal both}
    @keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}
I can't see any good reason for such delay. If you are not aware of this 8s delay, you might be misled into thinking the page is broken and that `ampproject.org` is really needed, while the page renders just fine without it, except for the delay.

Example: https://ampbyexample.com/



This kind of dishonest design is all too common now. If you pull back the curtain, you can find all sorts of other ways that the user is gaslighted.

One example is that the youtube mobile website will prevent you from playing a video in the background now. It didn't used to. This is to "encourage" you to use their Youtube RED app.


Okay this is a pretty bad thing to do.


I'd assume that's probably done to prevent FOUC while it's waiting for the JS to load. What do you get if you override that style?


If using uBlock Origin, you can try the example page with that cosmetic filter:

    ampbyexample.com##body:style(animation: none !important;)
One thing for sure, the result is much more pleasant than having to wait 8 seconds if one does not want to un-block 3rd-party javascript from `ampproject.org`.


I suppose webmasters could add the inline css

   body{animation:none !important;}
On mobile so I haven't had the chance to test


I should have included this in my first comment: this is a requirement from AMP to include the animation[1]:

    AMP HTML documents must contain the following boilerplate in their head tag. [...]
    <style amp-boilerplate>body{-webkit-animation: ...
[1] https://www.ampproject.org/docs/fundamentals/spec/amp-boiler...




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: