<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by christina kittybot on Medium]]></title>
        <description><![CDATA[Stories by christina kittybot on Medium]]></description>
        <link>https://medium.com/@christinakeelan?source=rss-9efb31af6011------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*45_R8d--C5xKR0YzRvPWZA.png</url>
            <title>Stories by christina kittybot on Medium</title>
            <link>https://medium.com/@christinakeelan?source=rss-9efb31af6011------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 15 Nov 2026 03:57:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@christinakeelan/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Feature Friday: AWS S3 backends, smarter images, and Squarespace support]]></title>
            <link>https://medium.com/flyword/feature-friday-aws-s3-backends-smarter-images-and-squarespace-support-ab8343b8c6fc?source=rss-9efb31af6011------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab8343b8c6fc</guid>
            <category><![CDATA[aws-s3]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[squarespace]]></category>
            <category><![CDATA[web-performance]]></category>
            <category><![CDATA[cdn]]></category>
            <dc:creator><![CDATA[christina kittybot]]></dc:creator>
            <pubDate>Fri, 18 Jan 2019 15:25:21 GMT</pubDate>
            <atom:updated>2019-01-29T01:41:47.539Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TpApLKl-UewfLVtMhVcs3A.png" /></figure><p>TGIF! We recently released Fly’s <a href="https://github.com/superfly/cdn">open source CDN</a>. It’s a powerful CDN built <em>specifically</em> for developers. Written in TypeScript, it’s an edge application that routes requests to different <a href="https://github.com/superfly/cdn/tree/master/src/backends">backends</a> and enhances them with <a href="https://github.com/superfly/cdn/tree/master/src/middleware">middleware</a>. You can use it right out of the box, or fork it and make it your own.</p><p>This week, we added a few things…</p><h3>1000% more Keanu</h3><p>Did you know Keanu Reeves <a href="https://www.archmotorcycle.com/">designs and sells motorcycles</a> on a site hosted by Squarespace? Did you know the motorcycle pictures are <em>huge </em>and noticeably slow the site down?</p><p>Lots of Keanu-like folks are in the same boat, so we built some libraries to help speed up Squarespace sites. Here’s what a CDN for Squarespace might look like:</p><pre>import { backends, middleware, pipeline } from &quot;@fly/cdn&quot;; const origin = backends.squareSpace({ subdomain: &quot;archmotorcycle&quot;, directory: &quot;/&quot;, hostname: &quot;www.archmotorcycle.com&quot; }); const mw = pipeline( middleware.httpsUpgrader, middleware.autoWebp, middleware.httpCache ) fly.http.respondWith(mw(origin));</pre><p>This example creates an origin that points to a Squarespace site and adds some middleware, including the new WebP encoder.</p><h3><a href="https://fly.io/docs/apps/cdn/modules/middleware.html#autowebp">Automatic WebP image encoding</a></h3><p>This middleware automatically serves WebP encoded images, but only for devices that support image/webp. Use it to serve images more efficiently and reduce page load time.</p><p>Client devices are generally pretty good about telling servers when they can handle special formats with Accept headers. Here&#39;s what Chrome sends when it makes a request:</p><pre>text/html,...,image/webp,image/apng,*/*;q=0.8</pre><p>This says “hey we <em>prefer</em> image/webp, if you don&#39;t have that try image/apng, and if you don&#39;t have that just send us whatever. We can use this to do some magic with <a href="https://github.com/superfly/cdn/blob/master/src/middleware/auto-webp.ts#L35-L70">logic</a> like this:</p><ul><li>Check the request’s Accept header to see if a client can handle image/webp</li><li>Look for a WebP version of the URL in the cache</li><li>Retrieve response from backend/origin</li><li>Check the response’s Content-Type for image/jpeg or image/png (both can be re-encoded as WebP</li><li>If WebP is acceptable, and the response is an image, re-encode it as WebP and store it in the cache.</li></ul><h3><a href="https://fly.io/docs/apps/cdn/modules/backends.html#awss3">Pull from AWS S3 Buckets</a></h3><p>S3 is a really handy place to put files. The awsS3 backend type lets you grab files from S3 buckets and send them to users. Even better, it supports private buckets!</p><p>If you have a bucket full of images, this works especially well with the autoWebp middleware.</p><h3><a href="https://fly.io/docs/apps/cdn/modules/backends.html#squarespace">Squarespace support</a></h3><p>The new squarespace backend type lets you route requests to Squarespace and modify responses before they are sent to visitors. Use this if you want to mix-and-match Squarespace sites with other services.</p><h3>Next up? It’s open source — &lt;your idea here&gt;</h3><p>Want to make a CDN that supports your favorite service? Know JavaScript? It’s pretty easy to add <a href="https://github.com/superfly/cdn/tree/master/src/backends">backend types</a>. You can see <a href="https://github.com/superfly/cdn/issues">in-progress issues</a> on GitHub. Feel free to jump on in, or <a href="https://gitter.im/superfly/fly">chat with us</a> and we can help you get going.</p><p><em>Originally published at </em><a href="https://fly.io/articles/feature-friday-jan-2019/"><em>fly.io</em></a><em> on January 18, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab8343b8c6fc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/flyword/feature-friday-aws-s3-backends-smarter-images-and-squarespace-support-ab8343b8c6fc">Feature Friday: AWS S3 backends, smarter images, and Squarespace support</a> was originally published in <a href="https://medium.com/flyword">Fly.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>