A place to cache linked articles (think custom and personal wayback machine)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.html 21KB

4 jaren geleden
4 jaren geleden
4 jaren geleden
4 jaren geleden
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  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>
  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>A Manifesto for Preserving Content on the Web (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="#f0f0ea">
  24. <meta name="msapplication-config" content="/static/david/icons2/browserconfig.xml">
  25. <meta name="theme-color" content="#f0f0ea">
  26. <!-- Documented, feel free to shoot an email. -->
  27. <link rel="stylesheet" href="/static/david/css/style_2020-06-19.css">
  28. <!-- See https://www.zachleat.com/web/comprehensive-webfonts/ for the trade-off. -->
  29. <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>
  30. <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>
  31. <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>
  32. <link rel="preload" href="/static/david/css/fonts/triplicate_t3_regular.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
  33. <link rel="preload" href="/static/david/css/fonts/triplicate_t3_bold.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
  34. <link rel="preload" href="/static/david/css/fonts/triplicate_t3_italic.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
  35. <script type="text/javascript">
  36. function toggleTheme(themeName) {
  37. document.documentElement.classList.toggle(
  38. 'forced-dark',
  39. themeName === 'dark'
  40. )
  41. document.documentElement.classList.toggle(
  42. 'forced-light',
  43. themeName === 'light'
  44. )
  45. }
  46. const selectedTheme = localStorage.getItem('theme')
  47. if (selectedTheme !== 'undefined') {
  48. toggleTheme(selectedTheme)
  49. }
  50. </script>
  51. <meta name="robots" content="noindex, nofollow">
  52. <meta content="origin-when-cross-origin" name="referrer">
  53. <!-- Canonical URL for SEO purposes -->
  54. <link rel="canonical" href="https://jeffhuang.com/designed_to_last/">
  55. <body class="remarkdown h1-underline h2-underline h3-underline hr-center ul-star pre-tick">
  56. <article>
  57. <header>
  58. <h1>A Manifesto for Preserving Content on the Web</h1>
  59. </header>
  60. <nav>
  61. <p class="center">
  62. <a href="/david/" title="Aller à l’accueil">🏠</a> •
  63. <a href="https://jeffhuang.com/designed_to_last/" title="Lien vers le contenu original">Source originale</a>
  64. </p>
  65. </nav>
  66. <hr>
  67. <main>
  68. <p>
  69. For a professor, the end of the year is an opportunity to clean up and reset for the upcoming new semester. I found myself clearing out old bookmarks—yes, bookmarks: that formerly beloved browser feature that seems to have lost the battle to 'address bar autocomplete'. But this nostalgic act of tidying led me to despair.
  70. </p>
  71. <p>
  72. Bookmark after bookmark led to dead link after dead link. Vanished are amazing pieces of writing on kuro5hin about tech culture, and a collection of mathematical puzzles and their associated discussion by academics that my father introduced me to; gone are Woodman's Reverse Engineering tutorials from my high school years, where I first tasted the feeling of dominance over software; even my most recent bookmark, a series of posts on Google+ exposing usb-c chargers' non-compliance with the specification, disappeared.
  73. </p>
  74. <p>
  75. This is more than just link rot, it's the increasing complexity of keeping alive indie content on the web, leading to a reliance on platforms and time-sorted publication formats (blogs, feeds, tweets).
  76. </p>
  77. <p>
  78. Of course, I have also contributed to the problem. A paper I published 7 years ago has an abstract that includes a demo link, which has been taken over by a spammy page with a pumpkin picture on it. Part of that lapse was laziness to avoid having to renew and keep a functioning web application up year after year.
  79. </p>
  80. <p>
  81. I've recommended my students to push websites to Heroku, and publish portfolios on Wix. Yet every platform with irreplaceable content dies off some day. Geocities, LiveJournal, what.cd, now Yahoo Groups. One day, Medium, Twitter, and even hosting services like GitHub Pages will be plundered then discarded when they can no longer grow or cannot find a working business model.
  82. </p>
  83. <p>
  84. The problem is multi-faceted. First, content takes effort to maintain. The content may need updating to remain relevant, and will eventually have to be rehosted. A lot of content, what used to be the vast majority of content, was put up by individuals. But individuals (maybe you?) lose interest, so one day maybe you just don't want to deal with migrating a website to a new hosting provider.
  85. </p>
  86. <p>
  87. Second, a growing set of libraries and frameworks are making the web more sophisticated but also more complex. First came jquery, then bootstrap, npm, angular, grunt, webpack, and more. If you are a web developer who is keeping up with the latest, then that's not a problem.
  88. </p>
  89. <p>
  90. But if not, maybe you are an embedded systems programmer or startup CTO or enterprise Java developer or chemistry PhD student, sure you could probably figure out how to set up some web server and toolchain, but will you keep this up year after year, decade after decade? Probably not, and when the next year when you encounter a package dependency problem or figure out how to regenerate your html files, you might just throw your hands up and zip up the files to deal with "later". Even simple technology stacks like static site generators (e.g., Jekyll) require a workflow and will stop working at some point. You fall into npm dependency hell, and forget the command to package a release. And having a website with multiple html pages is complex; how would you know how each page links to each other? index.html.old, Copy of about.html, index.html (1), nav.html?
  91. </p>
  92. <p>
  93. Third, and this has been touted by others already (and even <a href="https://gomakethings.com/the-web-is-not-dying/">rebutted</a>), the disappearance of the public web in favor of mobile and web apps, walled gardens (Facebook pages), just-in-time WebSockets loading, and AMP decreases the proportion of the web on the world wide web, which now seems more like a continental web than a "world wide web".
  94. </p>
  95. <p>
  96. So for these problems, what can we do about it? It's not such a simple problem that can be solved in this one article. The Wayback Machine and archive.org helps keep some content around for longer. And sometimes an altruistic individual rehosts the content elsewhere.
  97. </p>
  98. <p>
  99. But the solution needs to be multi-pronged. How do we make web content that can last and be maintained for at least 10 years? As someone studying human-computer interaction, I naturally think of the stakeholders we aren't supporting. Right now putting up web content is optimized for either the professional web developer (who use the latest frameworks and workflows) or the non-tech savvy user (who use a platform).
  100. </p>
  101. <p>
  102. But I think we should consider both 1) the casual web content "maintainer", someone who doesn't constantly stay up to date with the latest web technologies, which means the website needs to have low maintenance needs; 2) and the crawlers who preserve the content and <a href="https://archivebox.io/">personal archivers</a>, the "archiver", which means the website should be easy to save and interpret.
  103. </p>
  104. <p>
  105. So my proposal is seven unconventional guidelines in how we handle websites designed to be informative, to make them easy to maintain and preserve. The guiding intention is that the maintainer will try to keep the website up for at least 10 years, maybe even 20 or 30 years. These are not controversial views necessarily, but are aspirations that are not mainstream—a manifesto for a long-lasting website.
  106. </p>
  107. <ol><li>
  108. <b>Return to vanilla HTML/CSS</b> – I think we've reached the point where html/css is more powerful, and nicer to use than ever before. Instead of starting with a giant template filled with .js includes, it's now okay to just write plain HTML from scratch again. CSS Flexbox and Grid, canvas, Selectors, box-shadow, the video element, filter, etc. eliminate a lot of the need for JavaScript libraries. We can avoid jquery and bootstrap, as they are becoming less relevant anyways. The more libraries incorporated into the website, the more fragile it becomes. Skip the polyfills and CSS prefixes, and stick with the CSS attributes that work across all browsers. And frequently validate your HTML; it could save you a headache in the future when you encounter a bug.
  109. </li><li>
  110. <b>Don't minimize that HTML</b> – minimizing (compressing) your HTML and associated CSS/JS seems like it saves precious bandwidth and all the big companies are doing it. But why not? Well, you don't save much because your web pages should be gzipped before being sent over the network, so preemptively shrinking your content probably doesn't do much to save bandwidth if anything at all. But even if it did save a few bytes (it's just text in the end), you now need to have a build process and to add this to your workflow, so updating a website just became more complex. If there's a bug or future incompatibilityin the html, the minimized form is harder to debug. And it's unfriendly to your users; so many people got their start with HTML by smashing that View Source button, and minimizing your HTML prevents this ideal of learning by seeing what they did. Minimizing HTML does not preserve its educational quality, and what gets archived is only the resulting codejunk.
  111. </li><li>
  112. <b>Prefer one page over several</b> – several pages are hard to maintain. You can lose track of which pages link to what, and it also leads to some system of page templates to reduce redundancy. How many pages can one person really maintain? Having one file, probably just an index.html, is simple and unforgettable. Make use of that infinite vertical scroll. You never have to dig around your files or grep to see where some content lies. And how should your version control that file? Should you use git? Shove them in an 'old/' folder? Well I like the simple approach of naming old files with the date they are retired, like index.20191213.html. Using the ISO format of the date makes it so that it sorts easily, and there's no confusion between American and European date formats. If I have multiple versions in one day, I would use a style similar to that which is customary in log files, of index.20191213.1.html. A nice side effect is then you can access an older version of the file if you remember the date, without logging into the web host.
  113. </li><li>
  114. <b>End all forms of hotlinking</b> – this cautionary word seems to have disappeared from internet vocabulary, but it's one of the reasons I've seen a perfectly good website fall apart for no reason. Stop directly including images from other websites, stop "borrowing" stylesheets by just linking to them, and especially stop linking to JavaScript files, even the ones hosted by the original developers. Hotlinking is <a href="https://webmasters.stackexchange.com/questions/25315/hotlinking-what-is-it-and-why-shouldnt-people-do-it">usually considered rude</a> since your visitors use someone else's bandwidth, it makes the user experience slower, you let another website track your users, and worse of all if the location you're linking to changes their folder structure or just goes offline, then the failure cascades to your website as well. Google Analytics is unnecessary; store your own server logs and set up <a href="https://goaccess.io/">GoAccess</a> or cut them up however you like, giving you more detailed statistics. Don't give away your logs to Google for free.
  115. </li><li>
  116. <b>Stick with the 13 web safe fonts +2</b> – we're focusing on content first, so decorative and unusual typefaces are completely unnecessary. Stick with a small palette and the 13 web-safe fonts. Okay, so maybe you really need a neo-grotesque typeface that's not Arial/Helvetica, or you need a geometric typeface. Then go with what's minimally necessary, like Roboto (for neo-grotesque) and Open Sans (for geometric); they're the two most popular typefaces on Google Fonts so most likely to already be cached on your users' computer. Besides those +2 fonts, your focus should be about delivering the content to the user effectively and making the choice of font to be invisible, rather than stroking your design ego. Even if you use Google Fonts, they don't need to be hotlinked. Download the subset you need and locally serve them from your own folders.
  117. </li><li>
  118. <b>Obsessively compress your images</b> – faster for your users, less space to archive, and easier to maintain when you don't have to back up a humongous folder. Your images can have the same high quality, but be smaller. <a href="https://victorzhou.com/blog/minify-svgs/">Minify your SVGs</a>, losslessly compress your PNGs, generate JPEGs to exactly fit the width of the image. It's worth spending some time figuring out the most optimal way to compress and <a href="https://evilmartians.com/chronicles/images-done-right-web-graphics-good-to-the-last-byte-optimization-techniques">reduce the size of your images</a> without losing quality. And once <a href="https://caniuse.com/#feat=webp">WebP gains support on Safari</a>, switch over to that format. Ruthlessly minimize the total size of your website and keep it as small as possible. Every MB can cost someone real money, and in fact, my mobile carrier (Google Fi) charges a cent per MB, so a 25 MB website which is fairly common nowadays, costs a quarter itself, about as much as a newspaper when I was a child.
  119. </li><li>
  120. <b>Eliminate the broken URL risk</b> – there are <a href="https://uptimerobot.com">monitoring services</a> that will tell you when your URL is down, preventing you from realizing one day that your homepage hasn't been loading for a month and the search engines have deindexed it. Because 10 years is longer than most hard drives or operating systems are meant to last. But to eliminate the risk of a URL breaking completely, set up a second monitoring service. Because if the first one stops for any reason (they move to a pay model, they shut down, you forget to renew something, etc.) you will still get one notification when your URL is down, then realize the other monitoring service is down because you didn't get the second notification. Remember that we're trying to keep something up for over 10 years (ideally way longer, even 30 years), so a lot of services will shut down during this period, so two monitoring services is the safer way.
  121. </li></ol>
  122. <p>
  123. After doing these things, go ahead and place a bit of text in the footer, "The page was designed to last", linking to this page explaining what that means. The words promise that the maintainer will do their best to follow the ideas in this manifesto.
  124. </p>
  125. <p>
  126. Before you protest, this is obviously not for web applications. If you are making an application, then make your web or mobile app with the workflow you need. I don't even know any web applications that have remained similarly functioning over 10 years (except Philip Guo's python tutor, due to his <a href="http://www.pgbovine.net/python-tutor-ten-years.htm">minimalist strategy for maintaining it</a>) so it seems like a lost cause anyway. It's also not for websites maintained by an organization like Wikipedia or Twitter. You do your thing, and the salary for an IT team is probably enough to keep something alive for a while.
  127. </p>
  128. <p>
  129. In fact, it's not even that important you strictly follow the 7 "rules", as they're more of a provocation than strict rules.
  130. </p>
  131. <p>
  132. But let's say some small part of the web starts designing websites to last for content that is meant to last. What happens then? Well, people may prefer to link to them since they have a promise of working in the future. People more generally may be more mindful of making their pages more permanent. And users and archivers both save bandwidth when visiting and storing these pages.
  133. </p>
  134. <p>
  135. The effects are long term, but the achievements are incremental and can be implemented by website owners without being dependent on anyone else or waiting for a network effect. You can do this now for your website, and that already would be a positive outcome. Like using a recycled shopping bag instead of a taking a plastic one, it's a small individual action.
  136. </p>
  137. <p>
  138. This article is meant to provoke and lead to individual action, not propose a complete solution to the decaying web. It's a small simple step for a complex sociotechnical system. So I'd love to see this happen. I intend to keep this page up for at least 10 years.
  139. </p>
  140. <p>
  141. Thanks to my Ph.D. students Shaun Wallace, Nediyana Daskalova, Talie Massachi, Alexandra Papoutsaki, my colleagues James Tompkin, Stephen Bach, my teaching assistant Kathleen Chai, and my research assistant Yusuf Karim for feedback on earlier drafts.
  142. </p>
  143. <p>
  144. See discussions on <a href="https://news.ycombinator.com/item?id=21840140">Hacker News</a> and <a href="https://www.reddit.com/r/programming/comments/ed88ra/this_page_is_designed_to_last_a_manifesto_for/">reddit /r/programming</a>
  145. </p>
  146. </main>
  147. </article>
  148. <hr>
  149. <footer>
  150. <p>
  151. <a href="/david/" title="Aller à l’accueil">🏠</a> •
  152. <a href="/david/log/" title="Accès au flux RSS">🤖</a> •
  153. <a href="http://larlet.com" title="Go to my English profile" data-instant>🇨🇦</a> •
  154. <a href="mailto:david%40larlet.fr" title="Envoyer un courriel">📮</a> •
  155. <abbr title="Hébergeur : Alwaysdata, 62 rue Tiquetonne 75002 Paris, +33184162340">🧚</abbr>
  156. </p>
  157. <template id="theme-selector">
  158. <form>
  159. <fieldset>
  160. <legend>Thème</legend>
  161. <label>
  162. <input type="radio" value="auto" name="chosen-color-scheme" checked> Auto
  163. </label>
  164. <label>
  165. <input type="radio" value="dark" name="chosen-color-scheme"> Foncé
  166. </label>
  167. <label>
  168. <input type="radio" value="light" name="chosen-color-scheme"> Clair
  169. </label>
  170. </fieldset>
  171. </form>
  172. </template>
  173. </footer>
  174. <script type="text/javascript">
  175. function loadThemeForm(templateName) {
  176. const themeSelectorTemplate = document.querySelector(templateName)
  177. const form = themeSelectorTemplate.content.firstElementChild
  178. themeSelectorTemplate.replaceWith(form)
  179. form.addEventListener('change', (e) => {
  180. const chosenColorScheme = e.target.value
  181. localStorage.setItem('theme', chosenColorScheme)
  182. toggleTheme(chosenColorScheme)
  183. })
  184. const selectedTheme = localStorage.getItem('theme')
  185. if (selectedTheme && selectedTheme !== 'undefined') {
  186. form.querySelector(`[value="${selectedTheme}"]`).checked = true
  187. }
  188. }
  189. const prefersColorSchemeDark = '(prefers-color-scheme: dark)'
  190. window.addEventListener('load', () => {
  191. let hasDarkRules = false
  192. for (const styleSheet of Array.from(document.styleSheets)) {
  193. let mediaRules = []
  194. for (const cssRule of styleSheet.cssRules) {
  195. if (cssRule.type !== CSSRule.MEDIA_RULE) {
  196. continue
  197. }
  198. // WARNING: Safari does not have/supports `conditionText`.
  199. if (cssRule.conditionText) {
  200. if (cssRule.conditionText !== prefersColorSchemeDark) {
  201. continue
  202. }
  203. } else {
  204. if (cssRule.cssText.startsWith(prefersColorSchemeDark)) {
  205. continue
  206. }
  207. }
  208. mediaRules = mediaRules.concat(Array.from(cssRule.cssRules))
  209. }
  210. // WARNING: do not try to insert a Rule to a styleSheet you are
  211. // currently iterating on, otherwise the browser will be stuck
  212. // in a infinite loop…
  213. for (const mediaRule of mediaRules) {
  214. styleSheet.insertRule(mediaRule.cssText)
  215. hasDarkRules = true
  216. }
  217. }
  218. if (hasDarkRules) {
  219. loadThemeForm('#theme-selector')
  220. }
  221. })
  222. </script>
  223. </body>
  224. </html>