I have a unique problem that is difficult to solve with Google. I am combining all my javascript and css into separate php files that use require_once () to pull out the contents of the files. The javascript file looks something like this:
<?php
header('Content-Type: text/javascript');
require_once('jquery.form.js');
require_once('jquery.jqtransform.js');
require_once('jquery.validate.js');
?>
My particular problem is that web browsers will “see” that this is a dynamic page due to the php file extension, and then request content again every time the page loads on the site. What I'm trying to do is get the time of the last request from the browser , and then check the file modification time to see if I really need to send the contents of the file again. It is difficult to find the time of the last request by the user. In addition, I have not yet begun to solve the problem of finding the last modified date of the files that are included, so if there is information about searching for file file information on the server , this should also be taken into account.
Just to be clear, the reason I do this is because (I think) it uses gzip compression better than separate gzipped files.
Thanks in advance
source
share