When External Resources Go Down

It provides a very good lesson about progressive enhancement. Most of the page in question still works — I can read it and the readme file. I can switch to commits, tags, branches, etc. I can’t, however, watch the repo even thought it has a proper URL, because JavaScript normally processes it. I also can’t look at the network tab because it uses canvas. I can do the key tasks, but not the more advanced ones.

GitHub with no CDN

When I say “your site needs to work without CSS and JavaScript”, this is what I mean. The core functionality must be available. We rely on external resources for JavaScript (I load jQuery from Google, not locally). If the site uses a CDN, what happens when it goes offline? Users must still be able to access the content and perform the functions the site allows them to do. This is why it is crucial that you build frontend code starting with the HTML. If you try to do HTML, CSS, and JS all at the same time, you’ll end up with code that won’t function without all of them available. This harms the site, the users, the trust users have with the site, and ultimately it reflects poorly on us.

So the next time you start a project, write out all the HTML first, then add the CSS, then add the JavaScript (using it to add the markup that it uses). As you add each layer, make sure it all still works. Your frontend markup will be significantly more robust and fault tolerant of situations like this.