HTTP response header for Cache-Control not working in Apache httpd
4
votes
2
answers
2442
views
I have set Cache-Control in apache for 1 week for my JS Files but when i check in the browser Cache-Control shows no-cache. Where i am missing the configuration ?
Below is my configuration in apache
Header set Cache-Control "max-age=604800, public"
Request Header in Browser
Request URL:http://test.com/Script.js?buildInfo=1.1.200
Request Method:GET
Status Code:200 OK
Request Headersview source
Accept:*/*
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
**Cache-Control:no-cache**
Connection:keep-alive
Host:test.com
Pragma:no-cache
Referer:http://test.com/home.jsp
User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/37.0.2062.120 Safari/537.36
Query String Parametersview sourceview URL encoded
buildInfo:1.1.200
Response Headersview source
Cache-Control:max-age=2592000
Connection:keep-alive
Content-Encoding:gzip
Content-Type:text/javascript
Date:Sun, 12 Oct 2014 16:17:46 GMT
Expires:Tue, 11 Nov 2014 16:17:46 GMT
Last-Modified:Tue, 07 Oct 2014 13:28:08 GMT
Server:Apache
Transfer-Encoding:chunked
Vary:Accept-Encoding
Asked by Huzefa
(89 rep)
Oct 12, 2014, 04:32 PM
Last activity: Apr 27, 2025, 08:03 PM
Last activity: Apr 27, 2025, 08:03 PM