5 ms·
Install a content blocker, and the original site sans bullshit is the best experience. Ironically the amp page is artificially slow when blocking amp’s JS beca
by stephenr 7y ago
Install a content blocker, and the original site sans bullshit is the best experience.
Ironically the amp page is artificially slow when blocking amp’s JS because they force an 8 second delay - via required boilerplate css - before content is visible.
- wizzwizz4 7y agoSource for your second paragraph: https://news.ycombinator.com/item?id=16730905 https://news.ycombinator.com/item?id=16730905 That's out of date now, though; despite still being part of the required boilerplate CSS for AMP pages, I can't find that delay in any of the https://amp.dev/ https://amp.dev/ pages (the ampbyexample.com replacement demo site). This is really shady.
- joshuamorton 7y agoIt's a little more complex than that: If you disable all js, there is no delay. If you specifically block amp js, there is a delay. There could certainly be a shady reason for this, but the justification makes sense: one of the goals of AMP is to have, basically, a single, correct, initial paint. That's why images are statically sized and amp sticks placeholders there until the real images load. The js delay exists to allow the site to fetch the js and use it to correctly render the initial paint, even on a slow/flaky connection where the js takes a bit to fetch.
- deleted 7y ago[deleted]
- stephenr 7y agoThe delay is css based not js based, so why would blocking all js affect it?
- wolfgang42 7y agoIf you tell the browser to disable execution of all <script> tags, it will instead evaluate the <noscript> tag which contains some additional CSS that disables the animation.
- stephenr 7y agoAh, I didn't realise/remember it has a noscript block, it's been a while since I dug into the issue originally.
- gregable 7y agoSites which optimize their pages via https://www.npmjs.com/package/@ampproject/toolbox-optimizer https://www.npmjs.com/package/@ampproject/toolbox-optimizer have the initial layout performed server-side instead of by javascript, and thus the CSS Flash-of-unstyled-content protection is removed. amp.dev runs this optimization, along with lots of other sites.
- gregable 7y agoYou misunderstand the 8 second CSS animation in the AMP boilerplate. Here's the code (simplified): <style> body { animation:-amp-start 8s steps(1,end) 0s 1 normal both} @keyframes -amp-start{from{visibility:hidden}to{visibility:visible}} </style> <noscript> <style amp-boilerplate> body{animation:none} </style> </noscript> See the noscript section: if javascript is disabled, the CSS displays the body immediately. If Javascript is enabled, but for some reason the AMP javascript fails to load, after 8 seconds, the page is displayed anyway. When the AMP Javascript loads (a single js file, one request, typically already in the users cache), the javascript displays the page immediately. The page is probably somewhat broken without the javascript loading, but the 8s is a fallback, not code to slow down non-javascript browsers. The only two cases where the 8s is relevant are: the network connection is so bad that the javascript file fails to load within 8s and the useragent has explicitly blocked the one javascript file on the page, without blocking javascript overall.
- munk-a 7y agoThis will hit a lot of people on the web today that have given up on a blanket block on JS (because a lot of pure text content simply fails to render without JS, yaaaaay) but do have a blanket blacklist on JS assets and whitelist requests on a need basis.
- 4ntonius8lock 7y agoAs intended. We desperately need some anticompetitive scrutiny on google. Unfortunately... https://www.opensecrets.org/orgs/summary.php?id=d000067823 https://www.opensecrets.org/orgs/summary.php?id=d000067823
- JoshMnem 7y agoThe 8-second delay is there to punish users who block JavaScript that is loaded from Google's servers (with ad-blockers) but still have JavaScript enabled.
- esrauch 7y ago