How the Internet works
Read Mozilla’s great introduction to how the Internet works.
Also, check out this animated guide to how the internet works.
- HTTP Basics, a thorough primer on HTTP.
- What’s a web server? This will tell you.
- Understanding status codes with Status Cats: every HTTP request has a response that is accompanied by a status code like
500 Internal Server Error, and these lovely felines can help you remember them.
- In order to understand how servers work, build a simple server script with Ruby.
- Understanding what JSON is.
- Understanding HTTP methods
- Understanding what APIs are.
- Understanding the AJAX request.
- AJAX documentation.
- Connect a front-end application with a separately-hosted back-end application: this keeps your concerns separate. The alternative is building HTML views with your back-end application or trying to integrate a front-end application onto a back-end application, and it can easily turn into spaghetti code. Here’s an example of the separated elements: building an Angular2 / Rails 5 website and deploying to Heroku, where the front-end is separated out from the back-end. Oh, and if you’re not convinced, read this article on why client-side rendering is a good idea. (That means when HTML pages are generated by client computers, rather than created in a back-end app and sent forward to the client.)
- Understanding PUT vs PATCH vs POST requests: “POST != Create and PUT != Update”
Understanding Caches and Caching
Let’s say I have a computer and I request to view the website “helloworld.com”. The server returns to me several files: an HTML index file, a stylesheet, and several images that the HTML file needs.
Now, let’s say that tomorrow, I ask again for these files by making a request to load “helloworld.com”. In the interim, no changes have been made on the server to those files. So, in order to conserve time and not re-request files that are unchanged, my computer simply re-loads the files it already received for this website, after checking that those files aren’t supposed to be expired.
This process of not re-requesting files is called cacheing, and most modern browsers do this. It’s an effective way of speeding up the loading of a website, but there immediately arises a need to manipulate these caches, for a variety of reasons.
- “Everything You Need to Know About the Browser Cache”: understanding cacheing in the browser
- “Introduction to Caches”: lower-level concepts
- Heroku, HTTP Caching in Ruby with Rails
- “Using Cache Purge to Keep Your Website Content Fresh and Responsive”