Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have been asked to find a way of preventing IIS from making conditional GETS (So the web server will always return 200 OK or an error if there is one). Is there a way to do this?

I am using IIS 6 in Windows Sever 2003.

share|improve this question
add comment

3 Answers 3

up vote 1 down vote accepted

Conditional GET is a part of the HTTP 1.1 standard. IIS can't disable it specifically, but it's possible you could write an ISAPI filter that strips out the conditional request headers: If-Modified-Since, If-Unmodified-Since, If-Match, If-None-Match, If-Range

I don't know of a readily available package to do this, so you may have to roll your own.

share|improve this answer
add comment

IIRF is a free URL Rewriter for IIS, that can rewrite the headers, using the RewriteHeader directive. It would look something like this:

RewriteCond %{HTTP_IF_MODIFIED_SINCE}  ^.+$
RewriteHeader HTTP_IF_MODIFIED_SINCE: .*  $1

Which basically says, if the "If-Modified-Since" header is non-empty, rewrite it to have nothing. You would have to have similar rules for the other headers.

Check the doc for IIRF online.

share|improve this answer
add comment

This kb article describes how conditional gets are constructed (or not) in iis 5 and iis 6. You might setup two web servers and force their ETag values to be different, then make sure each request is bounced back and forth between the two servers. That way you should always get a 200 OK response, and the browser will not use the cache.

Apparently this is bad for performance, because it makes it so the web server is always serving the resource even when it doesn't have to.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.