AFAIK, this is impossible to do (in IIS). For this code, several criteria must be met:
- The client must have a cached copy of the page.
- If-Modified-Since Request The header of the HTTP header / date should match what is on the server.
If both conditions are true, the server will return an HTTP status code of 304.
source share