How to remove eTag from IIS5 http headers - iis-5

Running IIS5 (yes, really). I'd like to remove the eTag http header that IIS generates for me. MS has an article on how to sync eTags across the web farm, but not how to remove them ( http://support.microsoft.com/?id=922733 ).
Is there a way to remove eTags?

AFAIK, there's no easy way to remove etag of web resources such as image, css or js files from IIS 5. As each of the etag value regenerates on each subsequent web browser refresh which is unnecessary since there might not be any changes on those web resources.
You might want to try EtagFix, it doesn't remove the etag though but it stabilizes the etag values so they don't change until the web resources are modified.
EtagFix stabilizes the etag that
Internet Information Services (IIS)
generates so that it doesn't change
each time the web server is restarted.
http://www.isapilabs.com/Products/ETagFix/index.htm

Go into Inetmgr and in the website properties, switch to the HTTP Headers tab and add an "ETag" custom HTTP header with no value.

this blog post describes how to completely remove the Etag http header in IIS (iis 6,iis 7 and iis 7.5)
http://lightspeednow.com/blog/2010/05/21/iis-tutorial-how-to-completely-remove-etags-entity-tags-from-iis6-iis7-and-iis7-5/

Related

Multi-language URL cache and basic Cloudflare setup

This is about the cache strategy for serving multiple languages on the same URL, while using Cloudflare (not enterprise).
(Obviously that's not a problem when navigating with JavaScript with Ajax requests or when using an "hreflang" link)
Our server handles it correctly, the nginx cache is able to store the different caches per language and serve them by a cookie or accept-language value. Also the client browser will be able to differentiate caches by language using “Etags” header.
But Cloudflare (not Enterprise), only holds one cache per URL, and cannot serve a cache depending on a cookie value.
My fix for this, is using Cache-Control=“no-cache”, so Cloudflare will always validate if the cache is still valid, if the requested language is the same as the Cloudflare cache, that will be true, if not, Cloudflare will receive a new cache.
I guess you can see the problem, if a page is constantly requested in different languages, Cloudflare will be changing the cache all the time, on top of always be validating to my server.
Do you see any better strategy with the same setup? (Not including: using Cloudflare Enterprise, using my own mini-CDN network of proxy servers, or separating the URLs completely by language.)

Server control of browser cache expiration timeout

We have an online learning management system hosted in IIS. A common problem is learners have to clear browser cache to resume an online course that had minor updates in recent history.
The LMS is classic ASP, the server is Windows 2012, IIS 7.
What I am hoping is that IIS has a setting to serve files with a timeout on the cache expiration that the client browser will honor.
Any help appreciated.
You could use "httpExpires" attribute which specifies a date and time that the content should expire, You need to add an HTTP "Expires" header to the response.
To configure a cache expiration date for a Web site or application you could follow the below steps:
Open Internet Information Services (IIS) Manager.
In the Connections pane, go to the site for which you want to
disable caching.
From the feature view, select HTTP Response Headers.
In the HTTP Response Headers pane, click Set Common Headers... in the
Actions pane.
In the Set Common HTTP Response Headers dialog box, check the box to
expire Web content, select the option to expire after a specific
interval or at a specific time, and then click OK.
You could also refer below article for more detail information:
Client Cache
Regards,
Jalpa

Serve two pages from two server for one url

I would like to serve two different pages from two servers for one url. Something like facebook does with login page (login page vs profile page on same url).
How will server know what page to serve? I went with cookie because I couldn't think of other solution.
Also cookie removal is needed on logout. I ended up with branch on nginx configuration to push request to right server and removing(setting expired time) cookie there.
Ok and now the bug itself. Chrome caches this url and when user clicks on link(to the same url) chrome skips request to the server and open wrong version from cache. It works when "disable cache" in debug panel is checked and I also confirmed this by checking traffic with wireshark.
To recap urls from browser point of view:
ex.com/ - Server A
ex.com/login_check - Server A -> redirects to / with cookie
ex.com/ - Server B
ex.com/?logout - Server A and remove cookie
ex.com/ - chrome skips request and serves cached content from B
How can be this fixed? Moreover this approach looks like too much magic and many things can go wrong. Could it be done differently?
This can be fixed by adding header for response from both servers.
Cache-Control: private, max-age=0, must-revalidate, no-store;

Conditional GET Request and Expiry Header testing with Firebug-NET

I'm using Firebug's NET feature to measure the performance of our application. I'm a bit confused the way it is displaying the timeline. We have enabled Expiry header for all static files(it is 30 days from the current date). Now even if the resource is available in cache, it still makes a conditional GET (that is what I think). Ideally there shouldn't make a connection to the server, but it takes 93ms to create a connection. Please find the image that I've attached.
Can some one please help me to understand this better?
The HTTP response contains a header entry "Etag". ETag is a cache validator tag.
The HTTP Client on seeing this response will always verify with the server if the Content has been updated.
Cache Validator tag has higher preference over other Cache control tags.
If you want content to be served from cache without it being validate on the server side then only keep the Expires header and remove the ETag header.

When do cached static files expire if not specified?

In IIS6, I notice that when "Enable content expiration" is not enabled, no cache-related or expiration headers are sent with the response. Yet static content, such as css files are properly returning 304 statuses on subsequent visits.
When does this content expire if nothing is specified? Is it browser dependent?
If Content Expiration isn't specified in IIS then the caching of website content will be controlled or affected by external factors such as your browser's settings, upstream proxies or content caching servers between the end user and your web server. These are often factors out side of your control.
Setting content expiration in IIS should force these 3rd parties to honour these caching settings and expire content at the correct time.

Resources