A place to cache linked articles (think custom and personal wayback machine)
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

index.html 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. <!doctype html><!-- This is a valid HTML5 document. -->
  2. <!-- Screen readers, SEO, extensions and so on. -->
  3. <html lang="fr">
  4. <!-- Has to be within the first 1024 bytes, hence before the `title` element
  5. See: https://www.w3.org/TR/2012/CR-html5-20121217/document-metadata.html#charset -->
  6. <meta charset="utf-8">
  7. <!-- Why no `X-UA-Compatible` meta: https://stackoverflow.com/a/6771584 -->
  8. <!-- The viewport meta is quite crowded and we are responsible for that.
  9. See: https://codepen.io/tigt/post/meta-viewport-for-2015 -->
  10. <meta name="viewport" content="width=device-width,initial-scale=1">
  11. <!-- Required to make a valid HTML5 document. -->
  12. <title>Foundations (archive) — David Larlet</title>
  13. <meta name="description" content="Publication mise en cache pour en conserver une trace.">
  14. <!-- That good ol' feed, subscribe :). -->
  15. <link rel="alternate" type="application/atom+xml" title="Feed" href="/david/log/">
  16. <!-- Generated from https://realfavicongenerator.net/ such a mess. -->
  17. <link rel="apple-touch-icon" sizes="180x180" href="/static/david/icons2/apple-touch-icon.png">
  18. <link rel="icon" type="image/png" sizes="32x32" href="/static/david/icons2/favicon-32x32.png">
  19. <link rel="icon" type="image/png" sizes="16x16" href="/static/david/icons2/favicon-16x16.png">
  20. <link rel="manifest" href="/static/david/icons2/site.webmanifest">
  21. <link rel="mask-icon" href="/static/david/icons2/safari-pinned-tab.svg" color="#07486c">
  22. <link rel="shortcut icon" href="/static/david/icons2/favicon.ico">
  23. <meta name="msapplication-TileColor" content="#f7f7f7">
  24. <meta name="msapplication-config" content="/static/david/icons2/browserconfig.xml">
  25. <meta name="theme-color" content="#f7f7f7" media="(prefers-color-scheme: light)">
  26. <meta name="theme-color" content="#272727" media="(prefers-color-scheme: dark)">
  27. <!-- Documented, feel free to shoot an email. -->
  28. <link rel="stylesheet" href="/static/david/css/style_2021-01-20.css">
  29. <!-- See https://www.zachleat.com/web/comprehensive-webfonts/ for the trade-off. -->
  30. <link rel="preload" href="/static/david/css/fonts/triplicate_t4_poly_regular.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" crossorigin>
  31. <link rel="preload" href="/static/david/css/fonts/triplicate_t4_poly_bold.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" crossorigin>
  32. <link rel="preload" href="/static/david/css/fonts/triplicate_t4_poly_italic.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" crossorigin>
  33. <link rel="preload" href="/static/david/css/fonts/triplicate_t3_regular.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
  34. <link rel="preload" href="/static/david/css/fonts/triplicate_t3_bold.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
  35. <link rel="preload" href="/static/david/css/fonts/triplicate_t3_italic.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
  36. <script>
  37. function toggleTheme(themeName) {
  38. document.documentElement.classList.toggle(
  39. 'forced-dark',
  40. themeName === 'dark'
  41. )
  42. document.documentElement.classList.toggle(
  43. 'forced-light',
  44. themeName === 'light'
  45. )
  46. }
  47. const selectedTheme = localStorage.getItem('theme')
  48. if (selectedTheme !== 'undefined') {
  49. toggleTheme(selectedTheme)
  50. }
  51. </script>
  52. <meta name="robots" content="noindex, nofollow">
  53. <meta content="origin-when-cross-origin" name="referrer">
  54. <!-- Canonical URL for SEO purposes -->
  55. <link rel="canonical" href="https://adactio.com/journal/18337">
  56. <body class="remarkdown h1-underline h2-underline h3-underline em-underscore hr-center ul-star pre-tick" data-instant-intensity="viewport-all">
  57. <article>
  58. <header>
  59. <h1>Foundations</h1>
  60. </header>
  61. <nav>
  62. <p class="center">
  63. <a href="/david/" title="Aller à l’accueil"><svg class="icon icon-home">
  64. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-home"></use>
  65. </svg> Accueil</a> •
  66. <a href="https://adactio.com/journal/18337" title="Lien vers le contenu original">Source originale</a>
  67. </p>
  68. </nav>
  69. <hr>
  70. <p>There was quite a kerfuffle recently about a feature being removed from Google Chrome. To be honest, the details don’t really matter for the point I want to make, but for the record, this was about <a href="https://www.chromestatus.com/feature/5148698084376576">removing <code>alert</code> and <code>confirm</code> dialogs from cross-origin iframes</a> (and eventually everywhere else too).</p>
  71. <p>It’s always tricky to <a href="https://whatwg.org/faq#removing-bad-ideas">remove a long-established feature from web browsers</a>, but in this case there were significant security and performance reasons. The problem was how the change was communicated. It kind of wasn’t. So the first that people found out about it about was when things suddenly stopped working (like CodePen embeds).</p>
  72. <p>The Chrome team responded quickly and the change has now been pushed back to next year. Hopefully there will be significant communication before that to let site owners know about the upcoming breakage.</p>
  73. <p>So all’s well that ends well and we’ve all learned a valuable lesson about the importance of communication.</p>
  74. <p>Or have we?</p>
  75. <p>While this was going on, <a href="https://twitter.com/estark37/status/1422694856544059396">Emily Stark tweeted a more general point about breakage on the web</a>:</p>
  76. <blockquote>
  77. <p>Breaking changes happen often on the web, and as a developer it’s good practice to test against early release channels of major browsers to learn about any compatibility issues upfront.</p>
  78. </blockquote>
  79. <p>Yikes! To me, this appears wrong on almost every level.</p>
  80. <p>First of all, breaking changes <em>don’t</em> happen often on the web. They are—and should be—rare. If that were to change, the web would suffer massively in terms of <a href="https://www.chromium.org/blink/platform-predictability">predictability</a>.</p>
  81. <p>Secondly, the onus is <em>not</em> on web developers to keep track of older features in danger of being deprecated. That’s on the browser makers. I sincerely hope we’re not expected to consult a site called <code>canistilluse.com</code>.</p>
  82. <p><a href="https://twitter.com/estark37/status/1422694856544059396/retweets/with_comments">I wasn’t the only one surprised by this message</a>.</p>
  83. <p><a href="https://twitter.com/simonw/status/1423123474629857281">Simon says</a>:</p>
  84. <blockquote>
  85. <p>No, no, no, no! One of the best things about developing for the web is that, as a rule, browsers don’t break old code. Expecting every website and application to have an active team of developers maintaining it at all times is not how the web should work!</p>
  86. </blockquote>
  87. <p><a href="https://twitter.com/eaf4/status/1422934984881487876">Edward Faulkner</a>:</p>
  88. <blockquote>
  89. <p>Most organizations and individuals do not have the resources to properly test and debug their website against Chrome canary every six weeks. Anybody who published a spec-compliant website should be able to trust that it will keep working.</p>
  90. </blockquote>
  91. <p><a href="https://twitter.com/youyuxi/status/1423127797174784003">Evan You</a>:</p>
  92. <blockquote>
  93. <p>This statement seriously undermines my trust in Google as steward for the web platform. When did we go from “never break the web” to “yes we will break the web often and you should be prepared for it”?!</p>
  94. </blockquote>
  95. <p>It’s worth pointing out that the original tweet was <em>not</em> an official Google announcement. As <a href="https://twitter.com/estark37">Emily says right there on her Twitter account</a>:</p>
  96. <blockquote>
  97. <p>Opinions are my own.</p>
  98. </blockquote>
  99. <p>Still, I was shaken to see such a cavalier attitude towards breaking changes on the World Wide Web. I know that removing dangerous old features is inevitable, but it should also be exceptional. It should not be taken lightly, and it should certainly not be expected to be an everyday part of web development.</p>
  100. <p>It’s almost miraculous that <a href="http://info.cern.ch/hypertext/WWW/TheProject.html">I can visit the first web page ever published</a> in a modern web browser and it still works. Let’s not become desensitised to how magical that is. I know it’s hard work to push the web forward, constantly add new features, while also maintaining backward compatibility, but it sure is worth it! We have collectively banked three decades worth of trust in the web as a stable place to build a home. Let’s not blow it.</p>
  101. <p>If you published a website ten or twenty years ago, and you didn’t use any proprietary technology but only stuck to web standards, you should rightly expect that site to still work today …and still work ten and twenty years from now.</p>
  102. <p>There was something else that bothered me about <a href="https://twitter.com/estark37/status/1422694856544059396">that tweet</a> and it’s not something that I saw mentioned in the responses. There was an unspoken assumption that the web is built by professional web developers. That gave me a cold chill.</p>
  103. <p>The web has made great strides in providing more and more powerful features that can be wielded in learnable, declarative, forgiving languages like HTML and CSS. With a bit of learning, anyone can make web pages complete with form validation, lazily-loaded responsive images, and beautiful grids that kick in on larger screens. The barrier to entry for all of those features has <em>lowered</em> over time—they used to require JavaScript or complex hacks. And with free(!) services like <a href="https://www.netlify.com/">Netlify</a>, you could literally drag a folder of web pages from your computer into a browser window and boom!, you’ve published to the entire world.</p>
  104. <p>But the common narrative in the web development community—and amongst browser makers too apparently—is that web development has become more complex; so complex, in fact, that only an elite priesthood are capable of making websites today.</p>
  105. <p>Absolute bollocks.</p>
  106. <p>You can <em>choose</em> to make it really complicated. Convince yourself that “the modern web” is inherently complex and convoluted. But then look at what makes it complex and convoluted: toolchains, build tools, pipelines, frameworks, libraries, and abstractions. Please try to remember that none of those things are required to make a website.</p>
  107. <p>This is for everyone. Not just for everyone to consume, but for everyone to make.</p>
  108. </article>
  109. <hr>
  110. <footer>
  111. <p>
  112. <a href="/david/" title="Aller à l’accueil"><svg class="icon icon-home">
  113. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-home"></use>
  114. </svg> Accueil</a> •
  115. <a href="/david/log/" title="Accès au flux RSS"><svg class="icon icon-rss2">
  116. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-rss2"></use>
  117. </svg> Suivre</a> •
  118. <a href="http://larlet.com" title="Go to my English profile" data-instant><svg class="icon icon-user-tie">
  119. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-user-tie"></use>
  120. </svg> Pro</a> •
  121. <a href="mailto:david%40larlet.fr" title="Envoyer un courriel"><svg class="icon icon-mail">
  122. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-mail"></use>
  123. </svg> Email</a> •
  124. <abbr class="nowrap" title="Hébergeur : Alwaysdata, 62 rue Tiquetonne 75002 Paris, +33184162340"><svg class="icon icon-hammer2">
  125. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-hammer2"></use>
  126. </svg> Légal</abbr>
  127. </p>
  128. <template id="theme-selector">
  129. <form>
  130. <fieldset>
  131. <legend><svg class="icon icon-brightness-contrast">
  132. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-brightness-contrast"></use>
  133. </svg> Thème</legend>
  134. <label>
  135. <input type="radio" value="auto" name="chosen-color-scheme" checked> Auto
  136. </label>
  137. <label>
  138. <input type="radio" value="dark" name="chosen-color-scheme"> Foncé
  139. </label>
  140. <label>
  141. <input type="radio" value="light" name="chosen-color-scheme"> Clair
  142. </label>
  143. </fieldset>
  144. </form>
  145. </template>
  146. </footer>
  147. <script src="/static/david/js/instantpage-5.1.0.min.js" type="module"></script>
  148. <script>
  149. function loadThemeForm(templateName) {
  150. const themeSelectorTemplate = document.querySelector(templateName)
  151. const form = themeSelectorTemplate.content.firstElementChild
  152. themeSelectorTemplate.replaceWith(form)
  153. form.addEventListener('change', (e) => {
  154. const chosenColorScheme = e.target.value
  155. localStorage.setItem('theme', chosenColorScheme)
  156. toggleTheme(chosenColorScheme)
  157. })
  158. const selectedTheme = localStorage.getItem('theme')
  159. if (selectedTheme && selectedTheme !== 'undefined') {
  160. form.querySelector(`[value="${selectedTheme}"]`).checked = true
  161. }
  162. }
  163. const prefersColorSchemeDark = '(prefers-color-scheme: dark)'
  164. window.addEventListener('load', () => {
  165. let hasDarkRules = false
  166. for (const styleSheet of Array.from(document.styleSheets)) {
  167. let mediaRules = []
  168. for (const cssRule of styleSheet.cssRules) {
  169. if (cssRule.type !== CSSRule.MEDIA_RULE) {
  170. continue
  171. }
  172. // WARNING: Safari does not have/supports `conditionText`.
  173. if (cssRule.conditionText) {
  174. if (cssRule.conditionText !== prefersColorSchemeDark) {
  175. continue
  176. }
  177. } else {
  178. if (cssRule.cssText.startsWith(prefersColorSchemeDark)) {
  179. continue
  180. }
  181. }
  182. mediaRules = mediaRules.concat(Array.from(cssRule.cssRules))
  183. }
  184. // WARNING: do not try to insert a Rule to a styleSheet you are
  185. // currently iterating on, otherwise the browser will be stuck
  186. // in a infinite loop…
  187. for (const mediaRule of mediaRules) {
  188. styleSheet.insertRule(mediaRule.cssText)
  189. hasDarkRules = true
  190. }
  191. }
  192. if (hasDarkRules) {
  193. loadThemeForm('#theme-selector')
  194. }
  195. })
  196. </script>
  197. </body>
  198. </html>