Reputation: 25
I am using JAWR to bundle my JS, CSS and Images in my grails app. The plugin works good. Although, I noticed an issue regarding caching with Akamai servers where the cache was not removed from one of their nodes. Thus, users in some cities would still see old content file while some users would see new files. like in LA and Toronto new files were being served and in seattle and new Jersey old files.
I would like to avoid this kind of situation. So I hunted down this piece of response header which I saw as part of the Js file after bundled js file was served.
HTTP/1.1 200 OK
Date: Sun, 08 Nov 2015 07:12:14 GMT
Server: Apache
**Cache-Control: public, max-age=315360000, post-check=315360000, pre-check=315360000**
Last-Modified: Sun, 06 Nov 2005 12:00:00 GMT
Etag: 2740050219
**Expires: Sat, 08 Nov 2025 07:12:14 GMT**
Content-Encoding: gzip
Keep-Alive: timeout=15, max=98
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/javascript;charset=UTF-8
I would like to remove /update some parts of the header(Expires, cache-control ) and would like to send no-cache as part of the request.
Please let me know if you need more info.
Thanks in advance.
Upvotes: 0
Views: 174
Reputation: 25
I created an class to override the JawrRequestHandler Cache values. This helps me in removing all the pre-set headers and over ride them .
Hope this helps !
Upvotes: 0