Would dynamically created JavaScript files be cached?

Posted by venksster on Stack Overflow See other posts from Stack Overflow or by venksster
Published on 2010-03-31T15:18:04Z Indexed on 2010/03/31 15:23 UTC
Read the original article Hit count: 319

Filed under:
|
|
|
|

So my application uses a LOT of js files. thats a lot of http requests. I decided to combine them dynamically at the server in packs of 3-4 files clubbed by functionality.


My client side request is: ...script type="text/javascript" src="http://mydomain.com/core-js.php" ...

My server side does: --core-js.php-- header("Content-type: application/x-javascript");

include_once('file1.js'); include_once('file2.js'); include_once('file3.js'); include_once('file4.js');


I am setting a far future expire header on core-js.php. My question is, would core-js.php be cached at the client side? If it would be, could someone please explain how?

Thanks!

© Stack Overflow or respective owner

Related posts about php

Related posts about JavaScript