Posts

Showing posts with the label How Stuff Work

Cache me if you can πŸƒ! A Guide to keep your cache fresh as a daisy with stale-while-revalidate

Image
Today, we are going to talk about an additional tool to help you maintain a fine balance between instancy and freshness when delivering data to your web applications. RFC5861 states two independent Cache-Control extensions that allow for the cache to respond to a request with the most up-to-date response held. 1. The stale-if-error HTTP Cache-Control extension allows a cache to return a stale response when an error such as Internal Server Error is encountered, rather than returning a hard error. This improves availability. 2. The stale-while-revalidate HTTP Cache-Control extension allows a cache to immediately return a stale response while it revalidates it in the background, thereby hiding latency (both in the network and on the server) from clients In this blog, we will be talking more about the stale-while-revalidate HTTP header. The basic idea of this header is to reduce the latency of serving cached content by your web browser to your application and have a refresh mechanism v...

How does URL work?

Image
Have you ever considered know how typing www.google.com on the very address bar of your browser land you to a page like this or ever stumbled upon to think what are those characters which make up a full length URL! If yes, then you are in the right placeπŸ˜‰ While some of the URL or Uniform Resource Locator is simple like google.com or india.gov.in other full-length URLs might be a bit confusing, especially when it contains words like https, &, #, = et cetera. In this post I will show you what are the ingredients of an URL starting with the scheme itself, that is the word http://. The word HTTP stands for Hyper Text Transmission Protocol. It can be thought of as a protocol or sets of commands which are followed for transmission of web-pages. As a matter of fact, in this vast Internet, there are a lot of schemes like HTTP present. Some other protocols include FTP or File Transfer Protocol which asits obvious name suggest is used for transferring files from one machine on t...