Question

I have just used the Combres library in my project to minify the css and js files, and basically optimize the page a bit. Everythere I read about the Combres I see that it sends the etags together with the resources it optimizes, and yet when I publish my project, the resources compressed by Combres doesn't have the etags on them. Is there any configuration I need to make to have this working? I am using windows azure to deploy my project (if it matters).

I would be grateful for help with this question.

Was it helpful?

Solution

You might have etags disabled by some means outside of Combres (such an http module). Depending on whether you are using IIS6 or IIS7.5 there are different techniques for removing etags. Some people have done it within the web.config under specific scenario (I think for classic app pool). You can search your web.config for 'etag' to see if there is anything in there. If its not in your web.config, search your web project for 'etag' to see if you are removing them in an IHttpModule somewhere.

Also before you spend too much time on this, you might consider forgetting etags anyways. They are sort of 'passe' and outdated. The thinking is that long reaching expiration dates on versioned files are sufficient. If a visitor/user cleared their cache there won't be any old etag to compare with anyway. If you update your combres resources its going to spit out a new versioned path which won't be compared with the old cached files' etags either. So eitherway you really don't benefit from etags with the current technology.

In fact many people go to the trouble of removing them because of their lack of usefulness and their waste of bandwidth. (Which might be why you don't have them. Some performance tuning thing you may have done in the past could have disabled them when possible.)

OTHER TIPS

It shouldn't matter that your files are minified, nor what utility you use to do so. ETags are controlled by the web server (IIS) but I'm not sure how that's handled on Azure, but you could use an HttpModule to customize ETags:

http://codebetter.com/karlseguin/2010/01/08/asp-net-performance-part-2-yslow/

Hope that helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top