Simplest way for Cache Busting in NodeJS/Express

Caching in Web browsers is important. Without caching page performance is hurt as each page navigation requires the same set of JavaScripts and CSS files to be re-fetched. We can achieve caching by setting Cache-Control header’s max-age in the HTTP response headers. In NodeJS/Express stack, you do this done by passing options map to express.static() middle-ware.

However, the challenge is to discard or bust this client cache for new code deployments. As HTTP is a stateless protocol, there is no way server can tell clients to ignore old caches and request again. If you do set max-age:0 then we shall not arrive in this situation at all. However, we want to achieve caching and refresh this cache with new code deployments.

Read more

Buzzword: Cloud Computing

Youtube link for video: Larry Ellison – What The Hell Is Cloud Computing Larry Ellison, CEO of Oracle Corporation, describes all the fuzz around cloud computing in a short introduction. He touches very reasonable concern – “computing industry is the only industry more fashion driven than woman’s fashion“ Of course, this is true. Think about the last 10 years, how many new languages introduced, how many new versions of existing languages, new frameworks are released everyday, etc; But what about the compatibility with old? Isn’t today we (as a system owner, who actually pays for software development) want to have…

Read more