1

I am using Apache HTTPD 2.2 on Windows. mod_expires is commented out. Most other stuff are not changed from the defaults. gzip is on.

I made some changes to my .js files. My client gets one 304 response for one of the .js files and never gets the rest. How can I force Apache to sort of flush everything and send all new files to the client?

The main html file includes these scripts in the head section of the main page:

    <script src="js/jquery-1.7.1.min.js" type="text/javascript"> </script>
    <script src="js/jquery-ui-1.8.17.custom.min.js" type="text/javascript"></script>

    <script src="js/trex.utils.js" type="text/javascript" charset="utf-8"></script> 
    <script src="js/trex.core.js" type="text/javascript" charset="utf-8"></script> 
    <script src="js/trex.codes.js" type="text/javascript" charset="utf-8"></script> 
    <script src="js/trex.emv.js" type="text/javascript" charset="utf-8"></script> 
    <script src="js/trex.b24xtokens.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/trex.iso.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/trex.span2.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/trex.amex.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/trex.abi.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/trex.barclays.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/trex.bnet.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/trex.visa.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/trex.atm.js" type="text/javascript" charset="utf-8"></script> 
    <script src="js/trex.apacs.js" type="text/javascript" charset="utf-8"></script> 
    <script src="js/trex.pstm.js" type="text/javascript" charset="utf-8"></script> 
    <script src="js/trex.stm.js" type="text/javascript" charset="utf-8"></script> 
    <script src="js/trex.thales.js" type="text/javascript" charset="utf-8"></script> 
    <script src="js/trex.fps-saf.js" type="text/javascript" charset="utf-8"></script> 
    <script src="js/trex.fps-iso.js" type="text/javascript" charset="utf-8"></script> 
    <script src="js/trex.app.js" type="text/javascript" charset="utf-8"></script> 

Apache access log has the following:

[07/Jul/2013:16:50:40 +0300] "GET /trex/index.html HTTP/1.1" 200 2033 "-" 
[07/Jul/2013:16:50:40 +0300] "GET /trex/js/trex.fps-iso.js HTTP/1.1" 304 
[08/Jul/2013:07:54:35 +0300] "GET /trex/index.html HTTP/1.1" 304 - "-" 
[08/Jul/2013:07:54:35 +0300] "GET /trex/js/trex.iso.js HTTP/1.1" 200 12417 
[08/Jul/2013:07:54:35 +0300] "GET /trex/js/trex.amex.js HTTP/1.1" 200 6683 
[08/Jul/2013:07:54:35 +0300] "GET /trex/js/trex.fps-saf.js HTTP/1.1" 200 2925
[08/Jul/2013:07:54:35 +0300] "GET /trex/js/trex.fps-iso.js HTTP/1.1" 304 

Chrome request headers are as below:

This file is ok, latest:

Request URL:http://localhost/trex/js/trex.iso.js
Request Method:GET
Status Code:200 OK (from cache)

THis file is ok, latest:

Request URL:http://localhost/trex/js/trex.amex.js
Request Method:GET
Status Code:200 OK (from cache)

This one is also ok:

Request URL:http://localhost/trex/js/trex.fps-iso.js
Request Method:GET
Status Code:200 OK (from cache)

The rest of the scrips all have 200 OK (from cache).

2
  • Can you post the header response the client gets? Of particular interest could be the ETag and Last-Modified values. Jul 7, 2013 at 16:45
  • Are you saying that the client/browser does not even request the other js files after getting a 304 for just one of them?
    – MrWhite
    Jul 7, 2013 at 17:33

1 Answer 1

0

I enabled the expires_module and all seems to work now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.