Iis – Does IIS 7/7.5 304 (Not Modified) involve disk IO

cacheiisscalabilitywebweb-server

I am wondering how does IIS (7/7.5) work in terms of 304 ((Not Modified) response code. For example when an image is cached on client side (i.e. a web browser) with the Last-Modified HTTP header set, does IIS need to actually check the if the physical image file has truly been updated? If there are a lot of images this disk IO activity may be the bottle neck even though the images are being cached on client side. Last-Modified will save in terms of data transfered down the wire but not in terms of server disk IO.

The same question can apply to HTTP ETag. I would assume that IIS need to work out the 'content hash' so that browser can figure out whether to fetch an updated page or just use browser cache.

Thanks.

Best Answer

Disk access is indeed required, at least in order to check that the image exists at all (i.e. that a 304, not 404, should be sent).