Google’s AMP is a gilded cage – Terence Eden’s Blog
▻https://shkspr.mobi/blog/2016/11/removing-your-site-from-amp
Retour d’expérience d’un bloggeur qui a activé AMP, puis a décidé le désactiver au bout d’un moment, et qui se trouva fort dépourvu : toutes ses pages en 404.
AMP, tu y adhères, tu n’en sors plus.
Le gars ne semble connaître ni les RewriteRules ni PHP...
Sur le même sujet :
Switching to Google AMP and back
Today I’m switching back from AMP to regular HTML. One reason is that I found that Disqus didn’t always reliably resizes, but there’s a few others.
I’ve always been pretty big on web standards, and AMP is basically a deviation from that. I really didn’t enjoy changing my <img> to <amp-img> tags. The weird boilerplate and new dependency on javascript didn’t help either. I believe my blog should be useful and useable in in places where Javascript is not enabled, and after removing AMP, this is true once more.
I believe that web standards will always win, so bending to the will of Google Engineers that make the web less open for something that is likely a fad didn’t seem right to me.
Another issue is that google effectively takes over your traffic, and replaces your url with their own. This means that if people want to share a link to your site, they’ll link to google, not you.
I still like the idea of AMP, and I would be happy to restrict myself to a stricter subset of HTML and CSS for better performance and to be allowed to be preloaded in google search results on mobile, but I refuse to tie myself to a superset.
The real question I would have though, is why didn’t they just use Atom or RSS for this?
Loading webfonts with high performance on responsive websites
▻http://bdadam.com/blog/loading-webfonts-with-high-performance.html
Only serve #fonts in woff format Other browsers get the old “websafe” fonts Download the font in “binary” format and optimize it Serve the fonts yourself Serve them as #css files - base64 encoded data URIs If the user doesn’t have the font, load it asynchronously and store in localStorage Otherwise load it from localStorage without accessing the server Have fun because your site renders much faster and your users have a much better usability experience
Bon j’ai envoyé un mail à l’auteur car impossible de commenter sur son Disqus sans avoir un compte autre part, et il m’a répondu, à propos de test de connectivité, donc je vous en fait profiter :
I think connectivity tests just aren’t reliable now. You can maybe make some predictions, but there are many factors, which make it almost impossible to guess appropriate enough. On a mobile device it also changes almost every time e.g. when you are travelling.
The cool thing about my method is that the browser loads those fonts asynchronously and it doesn’t really matter whether the font files can be downloaded or not, because the content is always going to be visible. In the worst case it will be displayed with fallback fonts.
What could be more interesting is to optimize the font stack. Each device has some default fonts which are always installed: like Roboto on Android, Tahoma on Windows etc.
Et effectivement, un truc intéressant, dans la pile de polices, après avoir mis celle qui doit être téléchargée, mais avant celles qui sont génériques ("verdana", « sans », etc), c’est d’arriver à trouver des polices qui sont dans chacun des systèmes un peu connu du marché (Windows 7 et 8, Android, OSX, Ubuntu, etc).
De cette manière, même sans avoir encore chargé la police voulue, le site sera tout de même plus joli qu’avec du verdana !
C’est, entre autre, aussi une idée pour la dist de #SPIP même quand on ne charge aucune police !
La suite, toujours du même auteur :
In my previous article about webfont loading I showed a technique about how to load webfonts without blocking page rendering and without annoying the users with flickering text on all pageloads. This time I show you an optimized version of the script and provide a solution for WOFF2 support for the newest browsers.
Expectations
– The users must see the text as soon as possible.
– As longs as the font is loading, the text must be rendered with the fallback font so that users can see and read it.
– Users shouldn’t be annoyed with flickering text on each page load.
– Modern browsers with WOFF2 support should receive the fonts in WOFF2 format. This means ca. 30% less filesize.
▻http://bdadam.com/blog/better-webfont-loading-with-localstorage-and-woff2.html
Ça serait pas mal d’arriver à automatiser ça dans SPIP. #idée_pour_SPIP