Error Pages Cache
Caching for Error Pages
Sometimes clients will notice that their error pages are being cached. Say one of their files was missing from the origin, and they re-uploaded it, but CDN is still returning their 404 page until the cache is fully purged. The reason behind this is that the 404 page happened to have a Cache Control Header. In the example below, a 404 page with a CCH which will be cached.|
1 2 3 4 5 6 7 8 9 10 |
$ curl -I http://foobar.example.com/myimages/some_random_image.png HTTP/1.1 404 Not Found Server: nginx/1.0.11 Date: Thu, 26 Jan 2012 20:01:36 GMT Content-Type: text/html;charset=utf-8 Connection: keep-alive <strong>Cache-Control: public, max-age=24383317 Expires: Tue, 06 Dec 2012 17:33:42 GMT Last-Modified: Sat, 01 Jan 2000 00:00:00 GMT</strong> Content-Length: 1051 |
|
1 2 3 |
ExpiresDefault A0 Header set Cache-Control "no-store, no-cache, must-revalidate, max-age=0" Header set Pragma "no-cache" |