Adding Caching to a Cloudflare Worker / / No Comments Last week I blogged about my first experience building a Cloudflare Worker serverless function. In that post, I built a simple serverless function that wrapped calls to the Pirate Weather API, a free and simple-to-use API for getting weather information. For today’s post, I thought I’d show how easy it is to add a bit of caching to the worker to help improve its performance. As with my last post, I’ve also got a video walkthrough of everything you watch instead. (Or read and watch, go crazy!) The Application # In the last post, I shared the complete code of the Worker, but let me share it again: // Lafayette, LAconst LAT = 30.22;const LNG = -92.02;export default { async fetch(request,... more → Posted in: JavaScript Tagged with: Adding, Caching, Cloudflare, Worker
Adding Form Participation Support to Web Components / / No Comments Many years ago when the web platform began to really improve, when everything was "HTML5 this" and "HTML5 that", I remember being particularly excited by the updates to forms. I started my web career doing a lot of form processing and have always thought it was one of the more important aspects of the platform. Anything that improved that was a good thing. In my explorations of web components, I was ecstatic to discover that web components can be participants in forms. So what do we mean by that? What’s a Form Field? # Form fields have a number of different features, including: Including a name and value as part of the overall form. This is the bare minimum thing a... more → Posted in: JavaScript Tagged with: Adding, Components, form, Participation, Support
Adding Download Support in an Eleventy Site / / No Comments I was thinking recently about how I would add "Downloads" support to an Eleventy site. By that I mean, a site where you have various resources (PDFs, zip, etc) and want to provide a way to let users download them in a consistent manner, as well as how basic tracking could be done as well. I came up with a few ideas I’d like to share, but as always, please let me know what you’ve done and what you would suggest. Method 1 – Meta Refresh For my first attempt, I imagined a site where I’ve got some files up in S3 (like I do for my images here) and I’d like to take a directory and set them up as resources. So for example, imagine a _data file named downloads.json: {... more → Posted in: JavaScript Tagged with: Adding, download, Eleventy, Site, Support
Adding Responsive Images with Cloudinary / / No Comments In case you can’t tell, I’ve been enjoying playing around with Cloudinary these last few weeks. As part of my research, I recently looked around in the docs for things I wanted to dig deeper into. One of the features I thought was fascinating was Cloudinary’s remote image support. What does that mean? Raymond Camden… more → Posted in: JavaScript Tagged with: Adding, Cloudinary, images, Responsive
Adding Social Share Links in Eleventy / / No Comments One common feature of content sites (including this one), is links/buttons/etc to share a piece of content on social media. Typically this is Twitter, but many sites will include ways to share links on Facebook, LinkedIn, and more. A reader asked me a few days ago about how this could be done in Eleventy and I thought I’d share a quick example. Raymond Camden… more → Posted in: JavaScript Tagged with: Adding, Eleventy, links, share, Social
Apple Is Adding Electric-Vehicle Routing to Maps App – Car and Driver / / No Comments Apple Is Adding Electric-Vehicle Routing to Maps App Car and Driver “map app” – Google News… more → Posted in: Interactive Maps Tagged with: Adding, Apple, Driver, ElectricVehicle, maps, Routing
As Apple Improves Its Maps App, Google Responds By Adding A Popular Waze Feature To Google Maps On iOS – Forbes / / No Comments As Apple Improves Its Maps App, Google Responds By Adding A Popular Waze Feature To Google Maps On iOS Forbes “map app” – Google News… more → Posted in: Interactive Maps Tagged with: Adding, Apple, feature, Forbes, Google, improves, maps, Popular, Responds, Waze