IIS 7 and Above
Unable to see cached data after disconnecting from network
Last post Sep 08, 2020 02:56 AM by Jalpa Panchal
Sep 02, 2020 05:33 AM|SghamIIS7|LINK
I am learning how to provide offline access and I'm using local server IIS7.
I wrote a very simple HTML5 web application, saved it into IIS7 local server and it works fine as it should while connected to network.
However after disconnecting from the network to go offline , emptying the browser cache, I
reloaded the application, yet i didn't see cached data.
It is as if IIS7 never got disconnected from network. All the applications that I saved in Local host server behave as if I am still online.
Am I missing a step to disconnect from IIS7 before disconnecting from network to see the application cache data?
I do see the cache information if I type about: cache in address bar field.
But all applications yet work as if I am online.
Sep 03, 2020 02:23 AM|Jalpa Panchal|LINK
To enable cache in iis you could use the HTTP Response Headers feature.
1)Open IIS Manager, select your site.
2)double click the HTTP Response Headers from the middle pane
3)In the HTTP Response Headers pane, click Set Common Headers... in the Actions pane.
4)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:
Sep 04, 2020 02:56 AM|SghamIIS7|LINK
The attachment above is what i get after running the application on IIS 7.
However after disconnecting the network, emptying the browser local cache and reloading the
application in IIS i should be getting the attachment below showing cached rate in red box.
But it does not. it shows the green box-loading the application offline.
I did what you suggested with HTTP respond headers yet it did not work.
I don't think IIS is disconnected when I disconnect the network. That is
why it still works as normal offline.
Any more ideas maybe.
Sep 08, 2020 02:56 AM|Jalpa Panchal|LINK
could you share some sample code to reproduce the issue?