<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Nathaniel</title>
    <description>The latest articles on DEV Community by Nathaniel (@shadowfaxrodeo).</description>
    <link>https://dev.to/shadowfaxrodeo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F534732%2Fae5845b3-b1a6-4421-9b95-d7844a5e0490.png</url>
      <title>DEV Community: Nathaniel</title>
      <link>https://dev.to/shadowfaxrodeo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shadowfaxrodeo"/>
    <language>en</language>
    <item>
      <title>Creating a space to focus</title>
      <dc:creator>Nathaniel</dc:creator>
      <pubDate>Wed, 01 Apr 2026 19:14:20 +0000</pubDate>
      <link>https://dev.to/shadowfaxrodeo/creating-a-space-to-focus-5ccj</link>
      <guid>https://dev.to/shadowfaxrodeo/creating-a-space-to-focus-5ccj</guid>
      <description>&lt;p&gt;It's been a while since I've posted to dev.to. I just wanted to let you know if you like my writing I do a weekly newsletter called &lt;a href="https://practicalbetterments.com/" rel="noopener noreferrer"&gt;Practical Betterments.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's about one-off actions to improve your life continuously — however marginally.&lt;/p&gt;

&lt;p&gt;Currently I'm doing a series on creating a dedicated space to help you with goals that require sustained focus.&lt;/p&gt;

&lt;p&gt;You can read the first one here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://practicalbetterments.com/create-a-dedicated-focus-nook/" rel="noopener noreferrer"&gt;Create a dedicated focus nook&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here's some other tips related to productivity and focus:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://practicalbetterments.com/add-spaces-to-the-dock-on-mac-os/" rel="noopener noreferrer"&gt;Add spaces to the dock on MacOS&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://practicalbetterments.com/block-browser-notification-requests/" rel="noopener noreferrer"&gt;Block browser notification requests&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://practicalbetterments.com/place-healthy-apps-within-thumbs-reach/" rel="noopener noreferrer"&gt;Place healthy apps within thumbs reach&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let me know what you think!&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>design</category>
      <category>workplace</category>
      <category>workstations</category>
    </item>
    <item>
      <title>Download all of Wikipedia on your phone</title>
      <dc:creator>Nathaniel</dc:creator>
      <pubDate>Mon, 27 Nov 2023 14:20:36 +0000</pubDate>
      <link>https://dev.to/shadowfaxrodeo/download-all-of-wikipedia-on-your-phone-17k4</link>
      <guid>https://dev.to/shadowfaxrodeo/download-all-of-wikipedia-on-your-phone-17k4</guid>
      <description>&lt;p&gt;There's a lot of data on the public internet — and vast amounts get added every day. But, how much of it is useful to anyone, and how much of it is conceivably useful to &lt;em&gt;you&lt;/em&gt;? &lt;/p&gt;

&lt;p&gt;The answer is &lt;code&gt;102 gigabytes&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Download all of Wikipedia on your phone and never be without the useful internet ever again.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why download Wikipedia
&lt;/h2&gt;

&lt;p&gt;I downloaded Wikipedia about a year ago and have used it more than I expected. Here's some of the benefits with real life examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;You get access to information on almost everything when there is no internet.&lt;/strong&gt; When the internet is patchy on a train, when you're underground, or in the middle of the ocean.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Saving money on data.&lt;/strong&gt; Especially useful while travelling when data is likely to be more expensive. You can look up the history of towns your train passes through, the culture of your destination, and solve culinary mysteries without having to chew anything.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It's better for your brain than social media.&lt;/strong&gt;  Removing some of the friction required to use Wikipedia — reduces the likelihood you'll spend time on social media. Wikipedia has much healthier &lt;a href="https://en.wikipedia.org/wiki/Wiki_rabbit_hole"&gt;rabbit holes&lt;/a&gt;. (This &lt;a href="https://en.wikipedia.org/wiki/Wikipedia:Unusual_articles"&gt;list of unusual articles&lt;/a&gt; is always a good starting point.)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It's a nice reminder of the breadth of human interest.&lt;/strong&gt; Every article on wikipedia was written by a human being who cared about the topic. When I'm feeling down, especially about my writing, I remember that people care enough to write about &lt;a href="https://en.wikipedia.org/wiki/Pocket_lint"&gt;pocket lint&lt;/a&gt; — and I feel less blue. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resilience from global catastrophe and forced boredom.&lt;/strong&gt; At any moment society could collapse or you could find yourself hiding at a party. It's best to be prepared.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;It weighs much less than a hard copy.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to download Wikipedia
&lt;/h2&gt;

&lt;p&gt;There are a number of ways to download Wikipedia, a &lt;a href="https://en.wikipedia.org/wiki/Wikipedia:Database_download"&gt;complete list&lt;/a&gt; is available on (no surprise) Wikipedia. The most user-friendly way is to download an app to do it for you, and the most user-friendly app is &lt;strong&gt;Kiwix&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Kiwix is available on both Android and iOS. It's free, &lt;a href="https://github.com/kiwix"&gt;open-source&lt;/a&gt;, and can be used for other content — like &lt;a href="https://www.ifixit.com/"&gt;iFixit&lt;/a&gt; or &lt;a href="https://stackoverflow.com/"&gt;Stack Overflow&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Wikipedia weighs in at around &lt;code&gt;102 gigabytes (GB)&lt;/code&gt; with images and &lt;code&gt;60GB without&lt;/code&gt;. It's a big file — too big for a lot of phones. However, Kiwix also allows you to download subdivisions of wikipedia — like the top &lt;code&gt;1 million&lt;/code&gt; articles at &lt;code&gt;43.53GB&lt;/code&gt;, mathematics articles at &lt;code&gt;2.63GB&lt;/code&gt;, or only ice hockey articles &lt;code&gt;527.6MB&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Here's how to do it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Download Kiwix for your platform of choice: &lt;a href="https://apps.apple.com/us/app/kiwix/id997079563"&gt;iOS&lt;/a&gt;, &lt;a href="https://play.google.com/store/apps/details?id=org.kiwix.kiwixmobile&amp;amp;pli=1"&gt;Android&lt;/a&gt;, &lt;a href="https://kiwix.org/en/applications/"&gt;Everything else&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Open the app&lt;/li&gt;
&lt;li&gt;Navigate to &lt;code&gt;Library&lt;/code&gt;. (You have to hold down the bottom right menu button)&lt;/li&gt;
&lt;li&gt;Click &lt;code&gt;Categories&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;code&gt;Wikipedia&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;There are lots of options for downloading subdivisions of Wikipedia. Scroll down to the heading that simply says &lt;code&gt;Wikipedia&lt;/code&gt; to see the options for downloading all of English language Wikipedia.&lt;/li&gt;
&lt;li&gt;Choose the download size that is right for you.&lt;/li&gt;
&lt;li&gt;Make yourself a cup of tea and sit patiently next to your WiFi router.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>productivity</category>
    </item>
    <item>
      <title>Why lowercase letters save data</title>
      <dc:creator>Nathaniel</dc:creator>
      <pubDate>Sat, 25 Nov 2023 22:54:32 +0000</pubDate>
      <link>https://dev.to/shadowfaxrodeo/why-lowercase-letters-save-data-17p3</link>
      <guid>https://dev.to/shadowfaxrodeo/why-lowercase-letters-save-data-17p3</guid>
      <description>&lt;p&gt;Lowercase letters and uppercase letters use the same amout of data — &lt;code&gt;1 byte&lt;/code&gt; each.&lt;/p&gt;

&lt;p&gt;So, it's surprising to learn that swapping uppercase letters for lowercase letters saves data.&lt;/p&gt;

&lt;p&gt;How, you'll have to read my article on my website. I normally put them on dev.to, but this one has too many interactive elements.&lt;/p&gt;

&lt;p&gt;Here's the article in full:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://endtimes.dev/why-lowercase-letters-save-data/"&gt;why lowercase letters save data&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;let me know what you think!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>performance</category>
      <category>html</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Practical Betterments</title>
      <dc:creator>Nathaniel</dc:creator>
      <pubDate>Sat, 29 Jul 2023 12:13:09 +0000</pubDate>
      <link>https://dev.to/shadowfaxrodeo/practical-betterments-49gk</link>
      <guid>https://dev.to/shadowfaxrodeo/practical-betterments-49gk</guid>
      <description>&lt;p&gt;&lt;a href="https://practicalbetterments.com"&gt;Pracitcal Betterments&lt;/a&gt; is a collection of one-off actions that improve your life continuously.&lt;/p&gt;

&lt;p&gt;For the past year I've been collecting what I was calling "life hacks", but are really their own thing — that I've decided to call practical betterments. Partly because life hack is sort of vague and can mean anything from "make your bed every morning", to "use toilet rolls to organize your wires" — but mostly because the domain &lt;a href="https://practicalbetterments.com"&gt;practicalbetterments.com&lt;/a&gt; was available.&lt;/p&gt;

&lt;p&gt;I didn't originally intend for this collection to be a website — but after boring everyone I know with them, it seemed important for my personal life to have an outlet.&lt;/p&gt;

&lt;p&gt;I've collected over a hundred of these — and am trying to write one up every morning. You can learn more about them on the &lt;a href="https://practicalbetterments.com/"&gt;about page&lt;/a&gt; or jump right in and get a taste for the kind of thing it is with these:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://practicalbetterments.com/cut-the-end-off-your-toothbrush/"&gt;Cut the end off your toothbrush&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://practicalbetterments.com/adjust-the-temperature-of-your-boiler/"&gt;Adjust the temperature of your boiler&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://practicalbetterments.com/switch-your-phone-to-dark-mode/"&gt;Switch your phone to dark mode&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I hope you enjoy them, let me know what you think!&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>jamstack</category>
      <category>webdev</category>
      <category>writing</category>
    </item>
    <item>
      <title>SVG to CSS Data URL converter with maybe the smallest possible output.</title>
      <dc:creator>Nathaniel</dc:creator>
      <pubDate>Sat, 03 Jun 2023 16:12:13 +0000</pubDate>
      <link>https://dev.to/shadowfaxrodeo/svg-to-css-data-url-converter-with-maybe-the-smallest-possible-output-25h</link>
      <guid>https://dev.to/shadowfaxrodeo/svg-to-css-data-url-converter-with-maybe-the-smallest-possible-output-25h</guid>
      <description>&lt;p&gt;I use something like this all the time — but it was never clear if it produced the optimal output.&lt;/p&gt;

&lt;p&gt;So i did a bunch of research and made this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://inputoutput.dev/svg-to-css-converter/"&gt;SVG to CSS converter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It converts SVG to a CSS compatible Data URL for use in attributes like &lt;code&gt;background-image&lt;/code&gt; and &lt;code&gt;mask-image&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;As far as I'm aware it produces the smallest possible output without compromising backwards compatibility.&lt;/p&gt;

&lt;p&gt;We're talking saving a few bytes here and there — but the compounded effect of using this sort of thing all the time should make a bigger difference in the grand scheme of things.&lt;/p&gt;

&lt;p&gt;It…&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;only encodes necessary characters &lt;/li&gt;
&lt;li&gt;changes attribute quotes to single quotes &lt;/li&gt;
&lt;li&gt;lowercases percent-encoding hex pairs &lt;/li&gt;
&lt;li&gt;swaps hex colors to their shorter named equivalents &lt;/li&gt;
&lt;li&gt;adds xlmns attribute if missing &lt;/li&gt;
&lt;li&gt;removes useless whitespace&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There's more information below the tool on the page if you're interested in understanding why it does these things.&lt;/p&gt;

&lt;p&gt;Let me know what you think,&lt;br&gt;
enjoy!&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>webdev</category>
      <category>css</category>
      <category>performance</category>
    </item>
    <item>
      <title>Accessibility issues with stylized unicode characters</title>
      <dc:creator>Nathaniel</dc:creator>
      <pubDate>Thu, 01 Jun 2023 12:25:08 +0000</pubDate>
      <link>https://dev.to/shadowfaxrodeo/accessibility-issues-with-stylized-unicode-characters-29li</link>
      <guid>https://dev.to/shadowfaxrodeo/accessibility-issues-with-stylized-unicode-characters-29li</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a piece I originally wrote as a warning on my website. It's aimed at a general audience — not nerds.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Unicode characters like 𝔱𝔥𝔢𝔰𝔢 cause accessibility issues and have a strong association with spam and scams.&lt;/p&gt;

&lt;p&gt;You've probably landed on this page because you clicked &lt;strong&gt;learn more&lt;/strong&gt; on the warning on one of the &lt;a href="https://inputoutput.dev/unicode-fancy-font-generator/"&gt;unicode text converter tools.&lt;/a&gt; (or not, because this is dev.to)&lt;/p&gt;

&lt;p&gt;That's because the output of those tools cause accessibility issues.&lt;/p&gt;

&lt;p&gt;This page exists to explain those issues — and to convince you to either not use those tools, or to use them in a way that doesn't ruin people's experience of the web.&lt;/p&gt;

&lt;p&gt;In addition to the accessibility issues — they also have a strong association with spam and scams — more information can be found at the bottom of the article.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is unicode?
&lt;/h2&gt;

&lt;p&gt;To a computer everything is a number.&lt;/p&gt;

&lt;p&gt;For a computer to work with the alphabet you need to give each letter a unique number.&lt;/p&gt;

&lt;p&gt;For different computers to work together — they all need to agree on which letters are assigned which numbers.&lt;/p&gt;

&lt;p&gt;Unicode is the system the world uses to make sure every computer agrees on which &lt;strong&gt;character&lt;/strong&gt; is assigned which &lt;strong&gt;number&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Here's some examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;captial A&lt;/code&gt; is given the number &lt;code&gt;65&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;capital B&lt;/code&gt; is &lt;code&gt;#66&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;lowercase&lt;/code&gt; a is &lt;code&gt;#97&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The world has thousands of languages which have unicode symbols too:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Ђ&lt;/code&gt; is &lt;code&gt;#1026&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;က&lt;/code&gt; is &lt;code&gt;#4096&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;㌀&lt;/code&gt; is &lt;code&gt;#13056&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Unicode is also used for symbols and Emoji:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;✩&lt;/code&gt; is &lt;code&gt;#10025&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;𝔉&lt;/code&gt; is &lt;code&gt;#120073&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;😂&lt;/code&gt; is &lt;code&gt;#128514&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Without a system like unicode the internet would not be possible — this page would just be a mess of the wrong symbols.&lt;/p&gt;

&lt;h3&gt;
  
  
  Unicode mathematical symbols
&lt;/h3&gt;

&lt;p&gt;Unicode has many symbols used in math and phonetics — and these symbols often resemble stylised letters of the latin alphabet.&lt;/p&gt;

&lt;p&gt;These are intended for use in mathematics, but instead people use them to write stylized text online — often on social-media sites that don't have the option to use bold or italic text.&lt;/p&gt;

&lt;p&gt;Here's an example of what it looks this text looks like (it may not render on your device) — it says "this is some fancy text that looks funky and weird."&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ᴛʜɪs ⒤⒮ 𝘀𝗼𝗺𝗲 𝔣𝔞𝔫𝔠𝔶 𝕥𝕖𝕩𝕥 𝓉𝒽𝒶𝓉 🄻🄾🄾🄺🅂 𝚏𝚞𝚗𝚔𝚢 🅐🅝🅓 𝒘𝒆𝒊𝒓𝒅.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's true. It does look funky and weird — but it also comes with some serious accessibility issues.&lt;/p&gt;

&lt;h2&gt;
  
  
  Accessibility issues
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Screen readers
&lt;/h3&gt;

&lt;p&gt;Screen readers are an assistive technology that reads the contents of the web aloud.&lt;/p&gt;

&lt;p&gt;When a screen reader reads these symbols, it doesn't interpret them visually — it &lt;strong&gt;correctly&lt;/strong&gt; interprets them as the symbols that they are.&lt;/p&gt;

&lt;p&gt;So a sentence like: "please buy my plastic garbage" written like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;please buy my plastic 𝔤𝔞𝔯𝔟𝔞𝔤𝔢
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;is read aloud as "please buy my plastic mathematical fraktur g mathematical fraktur a mathematical fraktur r mathematical fraktur b mathematical fraktur a mathematical fraktur g mathematical fraktur e".&lt;/p&gt;

&lt;p&gt;Which is incredibly frustrating — and destroys any chance of the author selling their plastic garbage to screen reader users.&lt;/p&gt;

&lt;h3&gt;
  
  
  Incompatible devices
&lt;/h3&gt;

&lt;p&gt;Unicode contains over &lt;code&gt;100000&lt;/code&gt; letters and symbols and they add more every year.&lt;/p&gt;

&lt;p&gt;To have an image saved on your device for every single one of these symbols would take up a lot of memory — and be a lot of work for the device creators.&lt;/p&gt;

&lt;p&gt;It's not surprising that many devices don't render these symbols at all. Instead they show a bunch of squares.&lt;/p&gt;

&lt;p&gt;This is a familiar experience for anyone who has received a message containing a brand new emoji.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to solve these issues
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Social media and messaging apps
&lt;/h3&gt;

&lt;p&gt;Some social media sites and messaging apps allow you write bold and italic text — and have unintentionally made this a hidden feature.&lt;/p&gt;

&lt;p&gt;However, many sites and apps don't allow users to style text. So the simple solution is don't use these symbols — I hope this article has convinced you not to.&lt;/p&gt;

&lt;p&gt;Instead allow the content of your words to speak for themselves — or just quit social media and go outside a look at a flower.&lt;/p&gt;

&lt;h3&gt;
  
  
  On websites
&lt;/h3&gt;

&lt;p&gt;If you're new to web development and want to stylise text — then you need to learn some css. You can learn more about it here — &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS"&gt;MDN — CSS: Cascading Style Sheets&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you need to use these symbols on your website — like they are used on this page — and want screen readers to read them correctly — wrap them in an element with the aria-label attribute, like so:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;span aria-label="your text"&amp;gt;𝕪𝕠𝕦𝕣 𝕥𝕖𝕩𝕥&amp;lt;/span&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;or if the symbols you are using a purely decorative, and have no meaning for the reader. Use an &lt;code&gt;aria-hidden&lt;/code&gt; attribute instead.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;span aria-hidden&amp;gt;✩&amp;lt;/span&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Association with spam and scams
&lt;/h2&gt;

&lt;p&gt;In addition to accessibility issues — unicode symbols like these have a strong association with spam and online scams.&lt;/p&gt;

&lt;h3&gt;
  
  
  Spam
&lt;/h3&gt;

&lt;p&gt;One of the ways email and text message spam filters detect a spam message is by searching the email's content for specific words or phrases.&lt;/p&gt;

&lt;p&gt;Some spammers hope to avoid detection by replacing these words or specific letters in these words with stylized characters.&lt;/p&gt;

&lt;p&gt;Because of this, many people associate these stylised characters with spam.&lt;/p&gt;

&lt;h3&gt;
  
  
  Confusables and homoglyph attacks
&lt;/h3&gt;

&lt;p&gt;Scarier than spam. Criminal hackers use these unicode characters to trick you into giving up access to your online accounts.&lt;/p&gt;

&lt;p&gt;For example — lets say your example bank has a website with the example url: &lt;code&gt;example.com&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Someone may send you an email pretending to be your bank asking you to log into your account. It looks real, so you click on the link — and the link opens a website that looks identical to your bank's website.&lt;/p&gt;

&lt;p&gt;Even the &lt;code&gt;url&lt;/code&gt; is the same — but it's not the same! Instead of saying &lt;code&gt;example.com&lt;/code&gt; it says &lt;code&gt;𝚎𝚡𝚊𝚖𝚙𝚕𝚎.com&lt;/code&gt; or subtler still &lt;code&gt;еxample.com&lt;/code&gt;. (this one uses a Cyrillic &lt;code&gt;е&lt;/code&gt;)&lt;/p&gt;

&lt;p&gt;This is called a &lt;strong&gt;homoglyph attack&lt;/strong&gt; — &lt;em&gt;a homoglyph is a character that looks very similar to another character.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Unicode keeps a &lt;a href="https://util.unicode.org/UnicodeJsps/confusables.jsp"&gt;catalogue of all these homoglyphs&lt;/a&gt; to help people build tools to prevent such attacks. Unicode refers to them as &lt;strong&gt;confusables&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Avoid the association
&lt;/h3&gt;

&lt;p&gt;The association with spams, scams, online crime, make these unicode character extra worthwhile not to use.&lt;/p&gt;

&lt;p&gt;You may even find that your emails and text messages go straight to people's junk mail.&lt;/p&gt;

</description>
      <category>a11y</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>frontend</category>
    </item>
    <item>
      <title>The internet's latest website: InputOutput.dev</title>
      <dc:creator>Nathaniel</dc:creator>
      <pubDate>Fri, 10 Mar 2023 09:00:36 +0000</pubDate>
      <link>https://dev.to/shadowfaxrodeo/the-internets-latest-website-inputoutputdev-7o9</link>
      <guid>https://dev.to/shadowfaxrodeo/the-internets-latest-website-inputoutputdev-7o9</guid>
      <description>&lt;p&gt;Hello, just wanted to share a project I'm working on.&lt;/p&gt;

&lt;p&gt;Everyone should be able to use the internet to perform basic tasks without being bombarded with popups, compromising their privacy and security, or damaging the environment.&lt;/p&gt;

&lt;p&gt;The goal for &lt;a href="https://inputoutput.dev"&gt;inputoutput.dev&lt;/a&gt; is to be a repository of simple tools that just work without being annoying or causing harm.&lt;/p&gt;

&lt;p&gt;Tools like unit converters, random number generators, that sort of thing.&lt;/p&gt;

&lt;p&gt;Here's a list of some of the features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;every tool is under 14kB in a single http request. &lt;em&gt;See &lt;a href="https://endtimes.dev/why-your-website-should-be-under-14kb-in-size/"&gt;why your website should be under 14kB in size&lt;/a&gt;&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;every tool works without JavaScript. &lt;em&gt;See &lt;a href="https://endtimes.dev/why-your-website-should-work-without-javascript/"&gt;why your website should work without JavaScript&lt;/a&gt;&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;no tracking.&lt;/li&gt;
&lt;li&gt;nothing annoying.&lt;/li&gt;
&lt;li&gt;dark mode by default. &lt;em&gt;See &lt;a href="https://endtimes.dev/actually-dark-mode-can-save-the-world/"&gt;actually, dark mode can save the planet&lt;/a&gt;&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;and many more!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I've written a more in depth description on the about page for &lt;a href="https://inputoutput.dev/about/"&gt;inputoutput.dev&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let me know what you think or if there are any tools you'd like to have added.&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>webdev</category>
      <category>design</category>
      <category>frontend</category>
    </item>
    <item>
      <title>Zero byte apple-touch-icon markup</title>
      <dc:creator>Nathaniel</dc:creator>
      <pubDate>Mon, 30 Jan 2023 18:20:40 +0000</pubDate>
      <link>https://dev.to/shadowfaxrodeo/zero-byte-apple-touch-icon-markup-ica</link>
      <guid>https://dev.to/shadowfaxrodeo/zero-byte-apple-touch-icon-markup-ica</guid>
      <description>&lt;p&gt;*This is part of a series of pieces about code you can safely remove from the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; tags of your website. &lt;/p&gt;

&lt;p&gt;You can read the rest here: &lt;a href="https://getoutofmyhead.dev/" rel="noopener noreferrer"&gt;getoutofmyhead.dev&lt;/a&gt;*&lt;/p&gt;




&lt;p&gt;An &lt;code&gt;apple-touch-icon&lt;/code&gt; is an image used on &lt;code&gt;iOS&lt;/code&gt; devices when a website is added to the homescreen. &lt;/p&gt;

&lt;p&gt;Different &lt;code&gt;iOS&lt;/code&gt; devices display icons at different sizes, and so it's common to see something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"apple-touch-icon"&lt;/span&gt; &lt;span class="na"&gt;sizes=&lt;/span&gt;&lt;span class="s"&gt;"152x152"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://assets.guim.co.uk/images/favicons/fee5e2d638d1c35f6d501fa397e53329/152x152.png"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"apple-touch-icon"&lt;/span&gt; &lt;span class="na"&gt;sizes=&lt;/span&gt;&lt;span class="s"&gt;"144x144"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://assets.guim.co.uk/images/favicons/1fe70b29879674433702d5266abcb0d4/144x144.png"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"apple-touch-icon"&lt;/span&gt; &lt;span class="na"&gt;sizes=&lt;/span&gt;&lt;span class="s"&gt;"120x120"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://assets.guim.co.uk/images/favicons/c58143bd2a5b5426b6256cd90ba6eb47/120x120.png"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"apple-touch-icon"&lt;/span&gt; &lt;span class="na"&gt;sizes=&lt;/span&gt;&lt;span class="s"&gt;"114x114"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://assets.guim.co.uk/images/favicons/68cbd5cf267598abd6a026f229ef6b45/114x114.png"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"apple-touch-icon"&lt;/span&gt; &lt;span class="na"&gt;sizes=&lt;/span&gt;&lt;span class="s"&gt;"72x72"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://assets.guim.co.uk/images/favicons/873381bf11d58e20f551905d51575117/72x72.png"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"apple-touch-icon-precomposed"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://assets.guim.co.uk/images/favicons/6a2aa0ea5b4b6183e92d0eac49e2f58b/57x57.png"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
// 830 bytes - from theguardian.co.uk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  You can remove all this code from your site's &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;!
&lt;/h2&gt;

&lt;p&gt;Just like with &lt;a href="https://getoutofmyhead.dev/favicons" rel="noopener noreferrer"&gt;favicon.ico&lt;/a&gt; you can &lt;strong&gt;remove these links&lt;/strong&gt; and place a single &lt;code&gt;apple-touch-icon.png&lt;/code&gt; in your root directory.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;e.g. &lt;code&gt;https://example.com/apple-touch-icon.png&lt;/code&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://developer.apple.com/design/human-interface-guidelines/ios/icons-and-images/app-icon/#app-icon-sizes" rel="noopener noreferrer"&gt;&lt;code&gt;180x180&lt;/code&gt; is the largest icon size any &lt;code&gt;iOS&lt;/code&gt; device requires.&lt;/a&gt;[^1] &lt;strong&gt;Other devices will downscale the image to fit.&lt;/strong&gt; — and as of writing this — &lt;code&gt;Apple&lt;/code&gt; use a single &lt;code&gt;152x152&lt;/code&gt; icon on &lt;code&gt;apple.com&lt;/code&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  What about other sizes?
&lt;/h3&gt;

&lt;p&gt;If you'd still rather specify a different image for every possible icon size, you can still do that without adding any code to your &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;You can place multiple &lt;code&gt;apple-touch-icons&lt;/code&gt; in your site's root directory. &lt;a href="https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html" rel="noopener noreferrer"&gt;So long as they're named in the following way:&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;default&lt;/strong&gt; : &lt;code&gt;/apple-touch-icon.png&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;specify size&lt;/strong&gt; : &lt;code&gt;/apple-touch-icon-72x72.png&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;specify precomposed&lt;/strong&gt; : &lt;code&gt;/apple-touch-icon-precomposed.png&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;specify size and precomposed&lt;/strong&gt; : &lt;code&gt;/apple-touch-icon-57x57-precomposed.png&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  What does precomposed mean?
&lt;/h3&gt;

&lt;p&gt;Older versions of &lt;code&gt;iOS&lt;/code&gt; added lighting effects to icons on the homescreen. Adding the &lt;code&gt;precomposed&lt;/code&gt; suffix removed these effects.&lt;/p&gt;

&lt;p&gt;It was a way of telling &lt;code&gt;iOS&lt;/code&gt; that you had already added an effect — which is probably not true.&lt;/p&gt;




&lt;h3&gt;
  
  
  Android and &lt;code&gt;apple-touch-icons&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Older versions of &lt;code&gt;Chrome for Android&lt;/code&gt; used &lt;code&gt;apple-touch-icons&lt;/code&gt; for adding shortcuts to the homescreen. &lt;br&gt;
&lt;em&gt;But&lt;/em&gt; only if a large enough non-apple icon wasn't found.&lt;/p&gt;

&lt;p&gt;Some of older versions of &lt;code&gt;android&lt;/code&gt; would look for &lt;code&gt;apple-touch-icons&lt;/code&gt; at the site's root. &lt;a href="https://mathiasbynens.be/notes/touch-icons" rel="noopener noreferrer"&gt;But this practice ended as it was using &lt;code&gt;3-4%&lt;/code&gt; of mobile users bandwith!&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If &lt;code&gt;android&lt;/code&gt; can't find a large icon to use. It will use the site's &lt;code&gt;favicon.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;So you can even cover that unusual case by following this guide: (Zero byte favicon markup)[&lt;a href="https://dev.to/shadowfaxrodeo/zero-byte-favicon-markup-keep-the-favicons-without-any-of-the-markup-47hg"&gt;https://dev.to/shadowfaxrodeo/zero-byte-favicon-markup-keep-the-favicons-without-any-of-the-markup-47hg&lt;/a&gt;].&lt;/p&gt;

</description>
      <category>crypto</category>
      <category>cryptocurrency</category>
      <category>web3</category>
      <category>blockchain</category>
    </item>
    <item>
      <title>Handheld Friendly — Why do so many websites have this mystery tag?</title>
      <dc:creator>Nathaniel</dc:creator>
      <pubDate>Mon, 23 Jan 2023 12:46:58 +0000</pubDate>
      <link>https://dev.to/shadowfaxrodeo/handheld-friendly-why-do-so-many-websites-have-this-mystery-tag-21a6</link>
      <guid>https://dev.to/shadowfaxrodeo/handheld-friendly-why-do-so-many-websites-have-this-mystery-tag-21a6</guid>
      <description>&lt;p&gt;When I first started this project to &lt;code&gt;Marie Kondo&lt;/code&gt; HTML — I wrote some code that looked at the &lt;code&gt;&amp;lt;meta&amp;gt;&lt;/code&gt; tags used by the &lt;code&gt;10000&lt;/code&gt; most popular websites.&lt;/p&gt;

&lt;p&gt;Of that &lt;code&gt;10000&lt;/code&gt; only &lt;code&gt;6560&lt;/code&gt; returned a result — and of those &lt;code&gt;460&lt;/code&gt; had the &lt;code&gt;HandheldFriendly&lt;/code&gt; &lt;code&gt;&amp;lt;meta&amp;gt;&lt;/code&gt; tag:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"HandheldFriendly"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"True"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
// 45 Bytes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If we unscientifically extrapolate from those numbers — that's around &lt;code&gt;7%&lt;/code&gt; of websites using this tag — which is quite a lot, considering that it took days to work out what it does.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the HandheldFriendly &lt;code&gt;&amp;lt;meta&amp;gt;&lt;/code&gt; tag?
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;HandheldFriendly&lt;/code&gt; &lt;code&gt;&amp;lt;meta&amp;gt;&lt;/code&gt; tag was invented for the &lt;code&gt;AvantGo&lt;/code&gt; web browser.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;AvantGo&lt;/code&gt; was used on &lt;code&gt;Palm Pilots&lt;/code&gt; &lt;a href="https://web.archive.org/web/20180614094913/http://www.palminfocenter.com/news/6884/avantgo-going-away/" rel="noopener noreferrer"&gt;between 2000-2009.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is a Palm Pilot:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkr7tam3n4g128s2kqkv7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkr7tam3n4g128s2kqkv7.png" alt="Retro looking device with a stylus." width="300" height="351"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It was more of an &lt;code&gt;RSS&lt;/code&gt; feed than a browser. &lt;/p&gt;

&lt;p&gt;If the &lt;code&gt;HandheldFriendly&lt;/code&gt; tag wasn't present &lt;code&gt;AvantGo&lt;/code&gt; would &lt;a href="https://web.archive.org/web/20000903162014/http://avantgo.com/developer/reference/tutorials/jumpstart/jumpstart2.html#TOC3" rel="noopener noreferrer"&gt;remove &lt;code&gt;&amp;lt;table&amp;gt;&lt;/code&gt; elements, "certain image tags" and &lt;code&gt;JavaScript&lt;/code&gt; from from the page.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By using the &lt;code&gt;HandheldFriendly&lt;/code&gt; tag you're telling the &lt;code&gt;1&lt;/code&gt; person in the world that still uses &lt;code&gt;AvantGo&lt;/code&gt; that you made your website compatible with their Palm Pilot — &lt;strong&gt;which would be a lie!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;While backwards compatibility is important to consider — it is extremely unlikely that your website is compatible with an old Palm Pilot.&lt;/p&gt;

&lt;p&gt;Palm Pilots — and other devices from that time — cannot view websites that use basic security practices like &lt;code&gt;https&lt;/code&gt; and &lt;code&gt;tls&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;So, to access your website a Palm Pilot user would need make extremely nerdy modifications to their device, or use a proxy server.&lt;/p&gt;

&lt;p&gt;These people do exist.&lt;/p&gt;

&lt;p&gt;However, even if you want your website to work for the small number of hobbyists who will access it using a Palm Pilot — you still don't need this tag — the Palm Pilot will simply load your website as best as it can without the tag.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For anyone is still using these browsers, let their devices render your content in the default way.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Blackberry Browser
&lt;/h3&gt;

&lt;p&gt;The only other browser I could find that uses &lt;code&gt;HandheldFriendly&lt;/code&gt; is the BlackBerry Browser. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://uk.pcmag.com/operating-systems/6564/blackberry-os-45" rel="noopener noreferrer"&gt;Before &lt;code&gt;Blackberry OS 4.5&lt;/code&gt; released in &lt;code&gt;2008&lt;/code&gt;&lt;/a&gt; The browser would render a page in &lt;code&gt;Column View&lt;/code&gt; if &lt;code&gt;&amp;lt;meta name="HandheldFriendly" content="true"&amp;gt;&lt;/code&gt; wasn't present. &lt;/p&gt;

&lt;p&gt;However, &lt;strong&gt;Blackberry Browser also supported &lt;code&gt;&amp;lt;meta name="viewport" content="width=device-width"&amp;gt;&lt;/code&gt; &lt;a href="https://www.manualslib.com/manual/368374/Blackberry-Browser-Version-4-7-0-Fundamentals-Guide.html?page=18#manual" rel="noopener noreferrer"&gt;which had the same effect!&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why is it still around?
&lt;/h2&gt;

&lt;p&gt;I think we can safely say that the &lt;code&gt;HandheldFriendly&lt;/code&gt; &lt;code&gt;&amp;lt;meta&amp;gt;&lt;/code&gt; tag does not spark joy.&lt;/p&gt;

&lt;p&gt;It sparks fear — fear of the unknown.&lt;/p&gt;

&lt;p&gt;Nobody wants to be the person who deletes it and then breaks everything.&lt;/p&gt;

&lt;p&gt;But now that you know what it is, and what it does, you can thank it for it's service, and let it go.&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>productivity</category>
      <category>career</category>
    </item>
    <item>
      <title>Zero byte favicon markup — Keep the favicons without any of the markup</title>
      <dc:creator>Nathaniel</dc:creator>
      <pubDate>Mon, 16 Jan 2023 17:43:32 +0000</pubDate>
      <link>https://dev.to/shadowfaxrodeo/zero-byte-favicon-markup-keep-the-favicons-without-any-of-the-markup-47hg</link>
      <guid>https://dev.to/shadowfaxrodeo/zero-byte-favicon-markup-keep-the-favicons-without-any-of-the-markup-47hg</guid>
      <description>&lt;p&gt;&lt;code&gt;Favicons&lt;/code&gt; are the small icons that appear in browser tabs, usually next to the title of a website.&lt;/p&gt;

&lt;p&gt;Every website should have a &lt;code&gt;favicon&lt;/code&gt; to help differentiate it from websites in other tabs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://almanac.httparchive.org/en/2020/markup#favicons"&gt;&lt;code&gt;~75%&lt;/code&gt; of websites&lt;/a&gt; have a tag in the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; letting the browser know where to find the site's &lt;code&gt;favicon&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Here's a basic favicon link:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"icon"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"/favicon.ico"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
// 37 bytes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  You don't need this code!
&lt;/h2&gt;

&lt;p&gt;By default, all browsers look for a file &lt;code&gt;/favicon.ico&lt;/code&gt; in a site's root directory.&lt;/p&gt;

&lt;p&gt;So, you can avoid having any links in your &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; by hosting a &lt;code&gt;favicon&lt;/code&gt; at the root of your site: &lt;/p&gt;

&lt;p&gt;e.g. &lt;code&gt;https://example.com/favicon.ico&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;So, if your &lt;code&gt;favicon&lt;/code&gt; is already hosted at your site's root, and is in the &lt;code&gt;.ico&lt;/code&gt; format — you can go ahead and delete that link from your &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  What about different favicon sizes?
&lt;/h2&gt;

&lt;p&gt;Sometimes you'll see links to different &lt;code&gt;favicon&lt;/code&gt; sizes in the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;, like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"icon"&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"image/png"&lt;/span&gt; &lt;span class="na"&gt;sizes=&lt;/span&gt;&lt;span class="s"&gt;"96x96"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"/favicon-96x96.png"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"icon"&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"image/png"&lt;/span&gt; &lt;span class="na"&gt;sizes=&lt;/span&gt;&lt;span class="s"&gt;"32x32"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"/favicon-32x32.png"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"icon"&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"image/png"&lt;/span&gt; &lt;span class="na"&gt;sizes=&lt;/span&gt;&lt;span class="s"&gt;"16x16"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"/favicon-16x16.png"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
// 222 bytes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These links let the browser know the location of multiple &lt;code&gt;favicon&lt;/code&gt; sizes. &lt;br&gt;
The browser then picks the size that best suits it, the device, or the context.&lt;/p&gt;

&lt;p&gt;However, you don't need to do this to support multiple icon sizes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A single &lt;code&gt;.ico&lt;/code&gt; file can contain multiple icons&lt;/strong&gt; with different dimensions. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;.ico&lt;/code&gt; isn't &lt;em&gt;really&lt;/em&gt; an image format. It's a container for &lt;code&gt;.bmp&lt;/code&gt; and &lt;code&gt;.png&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;So you can remove all those seperate &lt;code&gt;&amp;lt;link&amp;gt;&lt;/code&gt; tags, and replace them with a single &lt;code&gt;favicon.ico&lt;/code&gt; in your site's root directory.&lt;/p&gt;




&lt;h3&gt;
  
  
  How to make a favicon containing multiple icons using gimp
&lt;/h3&gt;

&lt;p&gt;You can use the &lt;a href="https://www.gimp.org/"&gt;free and open-source image editor &lt;code&gt;Gimp&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Here's how you do it: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Create a new file with the dimensions of your largest icon size.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create a new layer with the dimensions of the other sizes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In each layer paste your icon and resize it to fit that layer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Export your file and select the &lt;code&gt;.ico&lt;/code&gt; file extension.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A dialogue box will appear, prompting you to select options for your icons. Select &lt;code&gt;Compressed (png)&lt;/code&gt; for a smaller file size.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click &lt;code&gt;Export&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://caniuse.com/link-icon-png"&gt;Note that &lt;code&gt;IE 10&lt;/code&gt; and below do not support &lt;code&gt;png&lt;/code&gt; favicons.&lt;/a&gt; To support &lt;code&gt;IE &amp;lt;= 10&lt;/code&gt; make sure any icon smaller than &lt;code&gt;48x48&lt;/code&gt; are not exported as &lt;code&gt;.png&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Icons larger that &lt;code&gt;48x48&lt;/code&gt; can still benefit from compression without effecting &lt;code&gt;IE &amp;lt;= 10&lt;/code&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  Further optimizations
&lt;/h3&gt;

&lt;p&gt;By default, favicons are cached for a long period of time. So any optimization to the favicon itself is ineffective at saving data overall.&lt;/p&gt;

&lt;p&gt;However, there's no downside to having an extremely lightweight favicon. So consider optimizing your favicon's size anyway.&lt;/p&gt;

&lt;p&gt;Your favicon may not be effectively compressed — so consider using the online tool &lt;a href="https://squoosh.app/"&gt;Squoosh&lt;/a&gt; to compress &lt;code&gt;png&lt;/code&gt;s before turning them into &lt;code&gt;ico&lt;/code&gt; files.&lt;/p&gt;

&lt;p&gt;Similar optimizations can also be achieved with &lt;code&gt;apple-touch-icons&lt;/code&gt; and &lt;code&gt;Tiles&lt;/code&gt; for Windows.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>performance</category>
      <category>html</category>
      <category>design</category>
    </item>
    <item>
      <title>Actually, dark mode can save the planet</title>
      <dc:creator>Nathaniel</dc:creator>
      <pubDate>Mon, 09 Jan 2023 17:05:16 +0000</pubDate>
      <link>https://dev.to/shadowfaxrodeo/actually-dark-mode-can-save-the-planet-3fg6</link>
      <guid>https://dev.to/shadowfaxrodeo/actually-dark-mode-can-save-the-planet-3fg6</guid>
      <description>&lt;p&gt;&lt;em&gt;This is an update to an article I wrote last year. I'll briefly go over it again here. There's no need to read the old article, actually I'd rather you didn't.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Was Blackle right?
&lt;/h2&gt;

&lt;p&gt;Many years ago, I was introduced to &lt;code&gt;Blackle&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Blackle&lt;/code&gt; is just &lt;code&gt;Google&lt;/code&gt; with a black background. Why? A black background uses less light, and so less electricity than a white background — and if everyone used &lt;code&gt;Blackle&lt;/code&gt; we'd pollute less carbon into the atmosphere — and every little helps — well that's the idea anyway — but is it true?&lt;/p&gt;

&lt;p&gt;Sort of.&lt;/p&gt;

&lt;p&gt;In 2007, when &lt;code&gt;Blackle&lt;/code&gt; was first launched, &lt;strong&gt;cathode ray tube&lt;/strong&gt; (CRT) monitors were still popular —  &lt;a href="https://web.archive.org/web/20070607181615/http://www.displaysearch.com/press/?id=781"&gt;around &lt;code&gt;25%&lt;/code&gt; of desktop computer monitors were CRTs&lt;/a&gt; — and &lt;a href="https://web.archive.org/web/20080719103639/http://enduse.lbl.gov/Info/LBNL-48581.pdf"&gt;CRTs do use less electricity displaying black pixels than white pixels.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;A CRT monitor is one of those old non-flat ones. They look like this:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--h8uH7NeK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g0jjf4tifbckvlvew1nm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--h8uH7NeK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g0jjf4tifbckvlvew1nm.png" alt="A CRT monitor" width="300" height="149"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;a href="http://ecoiron.blogspot.com/2007/08/history-in-january-2007-mark-ontkush.html"&gt;blog post that inspired &lt;code&gt;blackle&lt;/code&gt;&lt;/a&gt; used this &lt;code&gt;25%&lt;/code&gt; figure to suggest that &lt;code&gt;750 megawatt-hours&lt;/code&gt; a year would be saved if google went black.&lt;/p&gt;

&lt;p&gt;That's equivalent to the electricity use of &lt;a href="https://www.eia.gov/tools/faqs/faq.php?id=97&amp;amp;t=3"&gt;about &lt;code&gt;53&lt;/code&gt; households in the USA.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The remaining CRT screens were rapidly replaced with &lt;strong&gt;Liquid crystal displays&lt;/strong&gt;. LCDs use the same power regardless of the screen color — and so &lt;code&gt;Blackle&lt;/code&gt; became redundant…&lt;/p&gt;

&lt;p&gt;That is, until OLED screens became a thing. OLED screens, like CRTs, use less energy when the screen is darker — and so, once again using dark mode saves electricity — and prevents CO2 emissions.&lt;/p&gt;

&lt;h2&gt;
  
  
  How much CO2 does dark mode save on an OLED screen?
&lt;/h2&gt;

&lt;p&gt;We'll do some quick napkin math, and get a very rough idea of what kind of energy savings we're dealing with here — we'll use an iPhone as an example.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://mobileenerlytics.com/dark-mode/"&gt;Mobile Enerlytics&lt;/a&gt;, (a company that researches mobile battery drain), estimates dark mode saves anywhere between &lt;code&gt;1.8%&lt;/code&gt; and &lt;code&gt;44.7%&lt;/code&gt; of battery life depending on what activity is being performed and the screen brightness settings of the phone.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;For instance, reading The Verge on dark mode at &lt;code&gt;38%&lt;/code&gt; screen brightness saves &lt;code&gt;23.5%&lt;/code&gt; battery life, compared with light mode.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://support.apple.com/kb/SP770?locale=en_GB"&gt;An &lt;code&gt;iPhone X&lt;/code&gt; uses a &lt;code&gt;20 watt&lt;/code&gt; charger and takes &lt;code&gt;~1 hour&lt;/code&gt; to charge.&lt;/a&gt; If you charge it fully once per day, that's &lt;code&gt;20 watt hours&lt;/code&gt; a day, &lt;code&gt;7.2 kilowatt hours&lt;/code&gt; a year.&lt;/p&gt;

&lt;p&gt;I imagine people probably spend most of the time on their phone browsing the web, on social media apps, or messaging — &lt;em&gt;that's entirely based on my own experience and not on any data (because I can't find any).&lt;/em&gt; So we'll make a conservative estimate that dark mode saves &lt;code&gt;5%&lt;/code&gt; of battery life.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.eia.gov/tools/faqs/faq.php?id=74&amp;amp;t=11"&gt;In the USA &lt;code&gt;0.4kg&lt;/code&gt; of CO2 is emitted per &lt;code&gt;KWh&lt;/code&gt;.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So &lt;code&gt;1 million&lt;/code&gt; &lt;code&gt;iPhone X&lt;/code&gt;s on &lt;code&gt;dark mode&lt;/code&gt; for a year would save about &lt;code&gt;144,000kg&lt;/code&gt; of &lt;code&gt;CO2&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.epa.gov/greenvehicles/greenhouse-gas-emissions-typical-passenger-vehicle"&gt;&lt;strong&gt;The same emissions as 31 cars.&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;That was where the previous article concluded.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Dark mode saves a tiny amount of energy. It's not nothing — but with &lt;code&gt;200 million&lt;/code&gt; cars in the USA alone, it feels like nothing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;But a big part of this story is missing.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Built in emmisions
&lt;/h2&gt;

&lt;p&gt;The largest source of carbon emissions from smart phones and tablets is their production.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.apple.com/environment/pdf/products/iphone/iPhone_12_PER_Oct2020.pdf"&gt;According to Apple&lt;/a&gt;, each new &lt;code&gt;iPhone 12&lt;/code&gt; will produce &lt;code&gt;80kg&lt;/code&gt; of carbon. &lt;code&gt;14%&lt;/code&gt; is from using the device, &lt;code&gt;2%&lt;/code&gt; from transport, &lt;code&gt;&amp;lt; 1%&lt;/code&gt; from "end of life processing" and &lt;code&gt;83%&lt;/code&gt; from its production.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Producing less stuff has a much larger impact than using stuff less — and one of the reasons people buy new stuff is because their old stuff is broken.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One reason people buy a new phone is that the battery has died.&lt;/p&gt;

&lt;p&gt;Companies like Apple make it costly and difficult to replace a battery — and so, people tend to buy a new phone instead.&lt;/p&gt;

&lt;p&gt;Lithium ion batteries can only be used so many times before they stop working — &lt;a href="https://support.apple.com/en-us/HT208387"&gt;Apple says iPhone batteries maintain &lt;code&gt;80%&lt;/code&gt; of their capacity after &lt;code&gt;500&lt;/code&gt; charging cycles.&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;The more energy a phone uses — the sooner it stops working.&lt;/p&gt;

&lt;p&gt;So, supporting dark mode may save more carbon than a few cars.&lt;/p&gt;

&lt;h2&gt;
  
  
  Emissions intensity
&lt;/h2&gt;

&lt;p&gt;Increasing the lifetime of a product prevents a new product being created — which will emit carbon from it's manufacture, transport, packaging, and end-of-life.&lt;/p&gt;

&lt;p&gt;How you calculate the effect a product's lifetime has on the environment is not immediately obvious (at least to me!)&lt;/p&gt;

&lt;p&gt;But generally, the way it is done is by spreading the built in emissions across the lifetime of the product — then dividing those emissions by some measure that's relevant to the use of that product.&lt;/p&gt;

&lt;p&gt;This is called &lt;code&gt;emissions intensity&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  An example of emissions intensity
&lt;/h3&gt;

&lt;p&gt;The emissions intensity of say, a car, would be calculated with respect to how much mileage the car gives you. If it takes &lt;code&gt;1000 tons&lt;/code&gt; of CO2 to build a car and it only travels &lt;code&gt;10 kilometers&lt;/code&gt; before it explodes, the emissions intensity of the car would be &lt;code&gt;100 tons per kilometer&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;For the sake of simplicity we'll use the metric, &lt;code&gt;CO2 per year&lt;/code&gt; for the calculation of our smartphone emission intensities, and we'll compare it to some other things to give it context.&lt;/p&gt;

&lt;h2&gt;
  
  
  Calcualting how much dark mode saves
&lt;/h2&gt;

&lt;p&gt;I don't know how much dark mode increases the life-time of a phone battery. I've tried my best to find out, but there's too much uncertainty.&lt;/p&gt;

&lt;p&gt;So instead of giving you &lt;em&gt;my&lt;/em&gt; best guess. I've made a tool that allows you to input &lt;em&gt;your&lt;/em&gt; best guess on the missing data.&lt;/p&gt;

&lt;p&gt;I've prefilled it with information from the &lt;code&gt;iPhone 12&lt;/code&gt; environmental report, using &lt;code&gt;100 million&lt;/code&gt; units, and my best guesses. The code for the calculator is at the bottom of the article.&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/shadowfaxrodeo/embed/ExpWYzL?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Hopefully it'll give you an idea of the scope of this issue. &lt;/p&gt;

&lt;p&gt;There's some factors I've left out:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The likelyhood of getting a new phone goes up over time, new models are released, your phone has aged in other ways, software updates have stopped.&lt;/li&gt;
&lt;li&gt;The direct energy savings — mentioned at the start of the article.&lt;/li&gt;
&lt;li&gt;The second hand market — phones don't just have one owner before they end up in landfill.&lt;/li&gt;
&lt;li&gt;Batteries get replaced — and the carbon used to manufacture a battery is less than the device as a whole.&lt;/li&gt;
&lt;li&gt;Maybe dark mode also reduces the chance of screen burn-in, or increases the life-time of other parts.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And there's likely some I haven't thought of at all.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why your website (or app) should support dark mode?
&lt;/h2&gt;

&lt;p&gt;It's our responsibility as designers and developers to minimize the damage our products cause. Dark mode does have environmental benefits — and that should be reason enough. But it's also what the people want!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It's easier on the eyes.&lt;/li&gt;
&lt;li&gt;It saves battery.&lt;/li&gt;
&lt;li&gt;Its light is more flattering — therefore you're more likely find to love.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What's more, some browsers have the option to use &lt;code&gt;forced dark mode&lt;/code&gt; for websites that don't support it. This means your website may not render as you intended — and can lead to readability issues:&lt;/p&gt;

&lt;p&gt;Here's a screen shot from &lt;a href="https://themarkup.org"&gt;themarkup.org&lt;/a&gt; in &lt;code&gt;forced dark mode&lt;/code&gt; on &lt;code&gt;Google Chrome&lt;/code&gt;. The links become difficult to read.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---ZYeuRjx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iah03tkakbcy7cnw54ym.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---ZYeuRjx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iah03tkakbcy7cnw54ym.png" alt="A screenshot of the markup with a link that is difficult to read" width="481" height="70"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What have I missed?
&lt;/h3&gt;

&lt;p&gt;If you have any expertise, insider knowledge, or sources you'd like to add, let me know, and I'll happily update this article.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>css</category>
      <category>design</category>
      <category>ux</category>
    </item>
    <item>
      <title>Why your website should be under 14kb in size</title>
      <dc:creator>Nathaniel</dc:creator>
      <pubDate>Thu, 25 Aug 2022 00:22:00 +0000</pubDate>
      <link>https://dev.to/shadowfaxrodeo/why-your-website-should-be-under-14kb-in-size-398n</link>
      <guid>https://dev.to/shadowfaxrodeo/why-your-website-should-be-under-14kb-in-size-398n</guid>
      <description>&lt;p&gt;Having a smaller website makes it load faster — that's not surprising.&lt;/p&gt;

&lt;p&gt;What is surprising is that &lt;strong&gt;a &lt;code&gt;14kB&lt;/code&gt; page can load much faster than a &lt;code&gt;15kB&lt;/code&gt; page&lt;/strong&gt; — maybe &lt;code&gt;612ms&lt;/code&gt; faster — while the difference between a &lt;code&gt;15kB&lt;/code&gt; and a &lt;code&gt;16kB&lt;/code&gt; page is trivial.&lt;/p&gt;

&lt;p&gt;This is because of the &lt;strong&gt;TCP slow start&lt;/strong&gt; algorithm. &lt;strong&gt;This article will cover what that is, how it works, and why you should care.&lt;/strong&gt; But first we'll quickly go over some of the basics.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is TCP?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Transmission Control Protocol (TCP)&lt;/strong&gt; is a way of using the &lt;strong&gt;Internet Protocol (IP)&lt;/strong&gt; to send packets of data reliably — sometimes this is referred to as &lt;strong&gt;TCP/IP&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;When a browser requests your website (or an image or a stylesheet) it makes that request using &lt;strong&gt;HTTP&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;HTTP is built on top of TCP and a single HTTP request is usually made up of many TCP &lt;em&gt;packets&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;On its own IP is just a system for sending packets of data from one location on the internet to another. IP doesn't have a way of checking if a packet has successfully arrived at its destination.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;When it comes to websites, knowing that all the data has arrived is important — otherwise we could end up with missing chunks of web page. There are other uses of the web where this doesn't matter so much — like streaming live video.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;TCP is an extension of IP that allows a browser and your website's server to tell each other which packets have successfully arrived. &lt;/p&gt;

&lt;p&gt;The server sends some packets, then waits for a response from the browser saying it has received the packets (this is called an acknowledgement or ACK), then it sends some more — or if it hasn't received an ACK it can send the packets again.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is TCP slow start?
&lt;/h2&gt;

&lt;p&gt;TCP slow start is an algorithm used by servers to find out how many packets it can send at a time.&lt;/p&gt;

&lt;p&gt;When a browser first makes a connection to your server — the server has no way of knowing the amount of &lt;strong&gt;bandwidth&lt;/strong&gt; between them.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Bandwidth is how much data can be transmitted over a network per unit of time. Usually it's measured in bits per second (&lt;code&gt;b/s&lt;/code&gt;). Plumbing is a common analogy — think of bandwidth as how much water can come out of a pipe per second.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Your server doesn't know how much data the connection can handle — so it starts by sending you a small and safe amount of data — usually 10 TCP packets.&lt;/p&gt;

&lt;p&gt;If those packets successfully reach your site's visitor, their computer sends back an acknowledgement (ACK) saying the packets have been received.&lt;/p&gt;

&lt;p&gt;Your server then sends more data back, but this time it doubles the amount of packets.&lt;/p&gt;

&lt;p&gt;This process is repeated until packets are lost and your server doesn't receive an ACK. (At which point the server continues to send packets but at a slower rate).&lt;/p&gt;

&lt;p&gt;That's the gist of TCP slow start — in real life the algorithm varies, but that's essentially how it works.&lt;/p&gt;

&lt;h2&gt;
  
  
  So where does 14kB come from?
&lt;/h2&gt;

&lt;p&gt;Most web servers TCP slow start algorithm starts by sending 10 TCP packets.&lt;/p&gt;

&lt;p&gt;The maximum size of a TCP packet is &lt;code&gt;1500 bytes&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;This maximum is not set by the TCP specification, it comes from the &lt;a href="https://en.wikipedia.org/wiki/Ethernet_frame"&gt;ethernet standard&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Each TCP packet uses &lt;strong&gt;40 bytes&lt;/strong&gt; in its header — &lt;a href="https://en.wikipedia.org/wiki/IPv4#Packet_structure"&gt;16 bytes for IP&lt;/a&gt; and an additional &lt;a href="https://en.wikipedia.org/wiki/Transmission_Control_Protocol#TCP_segment_structure"&gt;24 bytes for TCP&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That leaves &lt;strong&gt;1460 bytes&lt;/strong&gt; per TCP packet. &lt;code&gt;10 x 1460 = 14600 bytes&lt;/code&gt; or roughly 14kB!&lt;/p&gt;

&lt;p&gt;So if you can fit your website — or the critical parts of it — into 14kB, you can save visitors a lot of time — the time it takes for one round trip between them and your website's server.&lt;/p&gt;

&lt;h2&gt;
  
  
  How bad can one round trip be?
&lt;/h2&gt;

&lt;p&gt;People are very impatient — and one round trip can be surprisingly long. How long depends on latency…&lt;/p&gt;

&lt;p&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/Performance/Understanding_latency"&gt;Latency is the time it takes a packet of data to travel from its source to it's destination.&lt;/a&gt; If bandwidth is how much water can go through a pipe per second — latency is the time it takes a droplet of water to enter the pipe and then exit the other end.&lt;/p&gt;

&lt;p&gt;Here's a fun example of how bad latency can be:&lt;/p&gt;

&lt;h3&gt;
  
  
  Satellite internet
&lt;/h3&gt;

&lt;p&gt;Satellite internet is provided by a satellite in orbit around the earth. It's used by people in very unpopulated areas, on oil rigs, cruise ships, and for inflight WiFi on airlines.&lt;/p&gt;

&lt;p&gt;To illustrate this example of bad latency, let's imagine a bunch of oil rig bros have forgotten their dice at home and need to use the excellent (under 14kB) &lt;a href="https://missingdice.com/dice-roller/"&gt;missingdice.com&lt;/a&gt; to play Dungeons &amp;amp; Dragons.&lt;/p&gt;

&lt;p&gt;First one of them uses their phone to make a request for the web page…&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;phone&lt;/strong&gt; sends that request to the rig's &lt;strong&gt;WiFi router&lt;/strong&gt; — which sends that data to the on-rig &lt;strong&gt;satellite dish&lt;/strong&gt; — lets be nice and say that takes &lt;code&gt;1ms&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The satellite dish then has to send that data to the &lt;strong&gt;satellite&lt;/strong&gt; in orbit above the earth.&lt;/p&gt;

&lt;p&gt;Typically, this is achieved using a satellite in &lt;a href="https://en.wikipedia.org/wiki/Geostationary_orbit"&gt;geostationary orbit&lt;/a&gt; at &lt;code&gt;35786km&lt;/code&gt; above the earths surface. The speed of light travels at &lt;code&gt;299792458 m/s&lt;/code&gt;, so a message sent from earth to the satellite takes &lt;code&gt;120ms&lt;/code&gt;. The satellite then sends the message back to a &lt;strong&gt;ground station&lt;/strong&gt;, which takes another &lt;code&gt;120ms&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Then the ground station has to send the request to wherever the &lt;strong&gt;server&lt;/strong&gt; is on earth (light slows down to &lt;code&gt;200000000 m/s&lt;/code&gt; when it's in a fibre optic cable). If the distance between the ground station and the server is the same as the distance between &lt;a href="https://hpbn.co/primer-on-latency-and-bandwidth/#speed-of-light-and-propagation-latency"&gt;New York and London it'll take about &lt;code&gt;28ms&lt;/code&gt;&lt;/a&gt; — but if it's more like the distance between New York and Sydney it'll take &lt;code&gt;80ms&lt;/code&gt; — so we'll call it &lt;code&gt;60ms&lt;/code&gt; (a convenient number for our math)&lt;/p&gt;

&lt;p&gt;Then the request needs to be processed by the server which could take maybe &lt;code&gt;10ms&lt;/code&gt; then the server sends it back again. &lt;/p&gt;

&lt;p&gt;Back to the ground station, up  into space, back down to the satellite dish, then to the wifi router, and back again to our oilers phone.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;phone -&amp;gt; WiFi router -&amp;gt; satellite dish -&amp;gt; satellite -&amp;gt; ground station -&amp;gt; server -&amp;gt; ground station -&amp;gt; satellite -&amp;gt; satellite dish -&amp;gt; WiFi router -&amp;gt; phone
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If we do the math that's  &lt;code&gt;10 + ( 1 + 120 + 120 + 60 ) x 2 = 612ms&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;That's an extra &lt;code&gt;612ms&lt;/code&gt; every round trip — perhaps that doesn't seem like a long time to wait but your website could easily have many round trips just to fetch it's first resource.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Also HTTPS requires two additional round trips before it can do the first one — which gets us up to &lt;code&gt;1836ms&lt;/code&gt;!&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What about latency for people who live on dry land?
&lt;/h3&gt;

&lt;p&gt;Satellite internet might seem like a deliberately bad example — I chose it because it illustrates the point and is weird — but for landlubbers latency can get worse than that for lots of reasons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;2g mobile typically has latency between &lt;a href="https://hpbn.co/mobile-networks/#brief-history-of-the-gs"&gt;&lt;code&gt;300ms&lt;/code&gt; and &lt;code&gt;1000ms&lt;/code&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;3g networks can have anywhere between &lt;a href="https://hpbn.co/mobile-networks/#brief-history-of-the-gs"&gt;&lt;code&gt;100ms&lt;/code&gt; and &lt;code&gt;500ms&lt;/code&gt;&lt;/a&gt; latency&lt;/li&gt;
&lt;li&gt;Noisy mobile networks  — say in an unusually crowded place like a music festival.&lt;/li&gt;
&lt;li&gt;Servers dealing with high amounts of traffic&lt;/li&gt;
&lt;li&gt;Bad stuff&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Spotty connections can also cause packets to be lost — resulting in another round trip to get the lost packets.&lt;/p&gt;

&lt;h2&gt;
  
  
  Now that you know about the 14kB rule, what can you do?
&lt;/h2&gt;

&lt;p&gt;Of course, you should make your website as small as possible — &lt;strong&gt;you love your visitors and you want them to be happy&lt;/strong&gt;. Aiming for each page to fit in under 14kB is good target. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;That 14kB includes compression — so it could actually be more like ~50kB of uncompressed data&lt;/strong&gt; — which is generous. &lt;a href="https://www.computerhistory.org/timeline/1969/"&gt;&lt;em&gt;Consider that the Apollo 11 guidance computers only had 72kB of memory.&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you lose the autoplaying videos, the popups, the cookies, the cookie consent banners, the social network buttons, the tracking scripts, javascript and css frameworks, and all the other junk nobody likes —  you're probably there.&lt;/p&gt;

&lt;p&gt;But, assuming you've tried your very best to fit everything into 14kB, and can't — the 14kB rule is still useful.&lt;/p&gt;

&lt;p&gt;If you &lt;strong&gt;Make sure the first 14kB of data you send to your visitors can be used to render something useful&lt;/strong&gt; — for instance some critical CSS, JS and the first few paragraphs of text explaining how to use your app.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note — The 14kB rule includes **HTTP headers&lt;/em&gt;* — which are uncompressed (even with HTTP/2 on the first response) — it also includes &lt;strong&gt;Images&lt;/strong&gt;, so load only what's above the fold and keep them very small, or use placeholders so your visitors know they're waiting for something good.*&lt;/p&gt;

&lt;h3&gt;
  
  
  Some caveats to the rule
&lt;/h3&gt;

&lt;p&gt;The 14kB rule is more like a rule of thumb, than a fundamental law of computing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Some servers have increased the TCP slow start initial window to 30 packets instead of 10&lt;/li&gt;
&lt;li&gt;Sometimes the server knows it can start with a larger number of packets because it's used the TLS handshake to establish a larger window can be used.&lt;/li&gt;
&lt;li&gt;Servers can cache how many packets a route can manage, and send more next time it connects.&lt;/li&gt;
&lt;li&gt;There's other caveats too — &lt;a href="https://www.tunetheweb.com/blog/critical-resources-and-the-first-14kb/"&gt;here's a more in depth article about why the 14kB rule isn't always the case&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  HTTP/2 and the 14kB rule
&lt;/h4&gt;

&lt;p&gt;There is an idea that the 14kB rule no longer holds true when using HTTP/2. I've read all I can about this without boring myself to death — but I haven't seen any evidence that servers using HTTP/2 have stopped using TCP slow start beginning with 10 packets.&lt;/p&gt;

&lt;h4&gt;
  
  
  HTTP/3 and QUIC
&lt;/h4&gt;

&lt;p&gt;Similarly to HTTP/2, there is a notion that HTTP/3 and QUIC will do away with the 14kB rule — this is not true. &lt;a href="https://datatracker.ietf.org/doc/id/draft-ietf-quic-recovery-26.html"&gt;QUIC recommends the same 14kB rule.&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Further reading
&lt;/h2&gt;

&lt;p&gt;Much of the content of this post comes from the following resources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://hpbn.co/"&gt;High performance browser networking &lt;em&gt;by Ilya Grigorik&lt;/em&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://sirupsen.com/napkin/problem-15"&gt;Increase HTTP Performance by Fitting In the Initial TCP Slow Start Window &lt;em&gt;by Simon Hørup Eskildsen&lt;/em&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.tunetheweb.com/blog/critical-resources-and-the-first-14kb/"&gt;Critical Resources and the First 14 KB - A Review&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.smashingmagazine.com/2021/08/http3-performance-improvements-part2/"&gt;HTTP3 performance improvements&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webperf</category>
      <category>webdev</category>
      <category>performance</category>
      <category>todayilearned</category>
    </item>
  </channel>
</rss>
