So this isn’t well documented at all, but new versions of Internet Explorer have a “feature” which transparently and aggressively caches everything. My experience of this comes from developing Windows Phone apps (via HttpClient), where repeated calls to a given API endpoint would return the same payload - it won’t even ask the server if it has changed, but instead just returns what was cached previously. I believe the caching is based on the URL, because a workaround to this is to attach a random query string onto the end of the URL.
An example implementation can be seen in my Last.fm .NET library:
An alternative solution which I haven’t tested and don’t fully understand:
Previously I believed this only applied to Windows Phone. But I am seeing the same kind of behaviour in IE11 Desktop and Metro when using Discourse - a potential reason is Microsoft’s continuing march to One Codebase For Everything.
- Visit main page and observe topic counters and stuff
- Left click on a topic link (in order to clear a counter)
- Read a bit/ wait until you know the main page will have changed due to new activity
- Click the logo to go back to the main page
- Observe the page being the same as it was when you left.
A manual refresh is required to get the new state.
I could be doing something wrong, pinning the blame wrongly on IE when Discourse is at fault, but I don’t think so because I don’t see the same thing happening in Firefox.
Can anyone else reproduce this?
P.S. if anyone is wondering why I’m opening so many IE related issues lately it’s because I figured that since I’m fairly unique in being an active user of Windows and Windows Phone 8+ - most dev people don’t use IE habitually - I thought it’d be a good way to help out. After all, over 50% of real people still use IE.