by SquareWheel · 8y ago · 0 comments
edit: Dug up the code.
<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>
body {animation:none}
</style>
</noscript>
The timeout function is turned off if JS isn't available, so JS being disabled shouldn't be a problem.I'm guessing this is actually to delay page paint so it doesn't display when half-loaded.
> block the AMP JavaScript
not,
> JS being disabled
Anyways, long story short, I don't like AMP and don't mind the occasional broken site. But it's definitely not for everyone.
https://developer.mozilla.org/en-US/docs/Glossary/Graceful_d...
There is no reason to load any JavaScript on a page that only contains some text and images. If the goal is to speed up loading, then blocking unnecessary JS shouldn't break the page. It's clear that page speed is not Google's primary goal with AMP.
I think you should read my parent comment a little bit closer.
Though it seems to me if the page is fast enough anyway (as amp pages claim to be), then this trick shouldn't be necessary anyway.