#nodejs: enhance client cache with ETag

Oscar Brito


To include the ETag header on requests:


  • Include etagify middleware on Express:


app.use(require('etagify')());


  • Include the header:


app.get('/page', function(req, res) {
res.etagify();
});


Link:
https://github.com/lloyd/connect-etagify


Visit www.divhide.com for more informations, contacts and news about Web Development.
See other blog posts at blog.divhide.com.

Divhide purpose is to follow the HTML5 movement and contribute with applications which prove the quality of technology.
Feel free to contact divhide.