Recently, our team encountered a peculiar caching issue with IE9 where certain changes in a specific web application weren't reflecting properly. While other sites worked fine, this particular application would randomly serve stale content. The vendor claims no one else experiences this, but we consistently reproduce it. Forcing a server refresh (Ctrl+F5) works, but that's not a sustainable solution for end users.
The application likely implements HTTP caching headers inconsistently. Here's what we typically see in the problematic responses:
HTTP/1.1 200 OK
Cache-Control: private
Last-Modified: Wed, 21 Oct 2015 07:28:00 GMT
Expires: Thu, 21 Oct 2021 07:28:00 GMT
The extremely long expiration period combined with "private" caching creates this unpredictable behavior.
Option 1: Registry Modification for IE
For IE9, we can modify the registry to disable caching for specific domains:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\Cache\Exceptions]
"example.com"="no-cache"
"*.example.org"="no-cache"
Save this as a .reg file and distribute to affected machines.
Option 2: Browser Policy Configuration
For enterprise environments, you can push this setting via Group Policy:
User Configuration
→ Administrative Templates
→ Windows Components
→ Internet Explorer
→ Internet Control Panel
→ Advanced Settings
→ Browsing
→ "Do not save encrypted pages to disk" = Enabled
Option 3: Fiddler Script Interception
For development/testing, use Fiddler to inject no-cache headers:
static function OnBeforeResponse(oSession: Session) {
if (oSession.HostnameIs("problemdomain.com")) {
oSession.oResponse.headers["Cache-Control"] = "no-cache, no-store, must-revalidate";
oSession.oResponse.headers["Pragma"] = "no-cache";
oSession.oResponse.headers["Expires"] = "0";
}
}
While we've focused on client-side fixes, the ideal solution requires server-side changes:
- Implement proper cache-busting with versioned URLs (app.js?v=12345)
- Use Cache-Control: no-store for sensitive pages
- Set appropriate max-age values instead of long Expires headers
Verify your changes by:
1. Open developer tools (F12)
2. Navigate to the Network tab
3. Refresh the page
4. Check response headers for:
- Cache-Control: no-cache
- Pragma: no-cache
- Expires: 0 or past date
For automated testing, you can use PowerShell to validate headers:
$response = Invoke-WebRequest -Uri "https://problemdomain.com" -Method Head
$response.Headers["Cache-Control"] | Should -BeLike "*no-cache*"
During recent testing of our enterprise web application in Internet Explorer 9, we encountered a peculiar caching issue where updated content wasn't reflecting properly for users. While other sites worked fine, this particular vendor-hosted application kept serving stale content until we manually triggered a "force refresh from server" via developer tools.
The most reliable way to prevent caching is through proper HTTP headers. Here's what the server should send for dynamic content:
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Expires: 0
However, since we can't control the vendor's server headers, we need client-side solutions.
For IE9, you can modify the registry to disable caching for specific domains:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\Cache\Extensible Cache\DomainSpecific]
"example.com"=dword:00000001
"subdomain.example.com"=dword:00000001
Replace "example.com" with your problematic domain. This forces IE to bypass cache for these domains.
If registry edits aren't feasible, you can use Fiddler to modify responses:
static function OnBeforeResponse(oSession: Session) {
if (oSession.hostname.Contains("problemdomain.com")) {
oSession.oResponse.headers["Cache-Control"] = "no-cache";
oSession.oResponse.headers["Pragma"] = "no-cache";
oSession.oResponse.headers["Expires"] = "-1";
}
}
For pages where you can inject JavaScript, this timestamp trick helps:
document.write('<script src="yourscript.js?nocache=' +
(new Date().getTime()) + '"></script>');
After implementing any solution, verify with:
- IE Developer Tools (F12) -> Network tab
- Check request/response headers for Cache-Control directives
- Monitor the "temporary internet files" folder