How To Configure CORS for the WordPress REST API

Published on

When using the WordPress REST API within a JavaScript application, you might encounter an error like this: Most CORS issues can be solved by adding the following to your .htaccess file: However, when you try the REST API request again from your application, you’ll get a new error. But why? The .htaccess rule we added […]

How To Add A BandCamp Download Code Form To Your Website

Published on

BandCamp has a artist/label feature that allows fans to redeem download codes for free music (pretty cool). In order to redeem a code, fans need to visit a page on the artist’s BandCamp site (ARTIST_NAME.bandcamp.com/yum). But what if you wanted your fans to redeem the codes from your website instead of sending them straight to […]

Making Google Maps Controls More Accessible

Published on

As of late 2019, Google Maps does not include alt attributes (blank or otherwise) on the img elements within the fullscreen control button. This is the case for both the Javascript API and Embed implementations. The missing alt attributes cause accessibility audits such as Chrome’s Lighthouse tool to give a lower score for such tests. […]

Visualizing Subscriber ZIP Code Data For Your Mailing List

Published on

I have an email sign up form on my music website that has an optional ZIP Code field. I built a small web app that accepts a CSV file and outputs the ZIP codes, or any other address data, on a Google map with markers for each subscriber.

Obfuscating File Paths for HTML Audio

Published on

The audio element is a fantastic part of HTML 5 that give you a ton of control over the UI and functionality of media on a page. However, it is far too easy to open up Dev Tools, find the absolute file path to a media file on a server and download it for free.