Skip Evans wrote:
Hey all,

I have an HTML template file I read into a PHP script and then after supplying dynamic data I send the template to the browser with

echo $html;

The HTML template contains many JS files in the <head>...</head> section referenced like this:

<script src="ajax/players.js" type="text/javascript"></script>

My question is this: how can I cause the JS files on the header.html file to be reloaded to the browser when ever they have been modified?

I'm looking now at the last-modified header stuff, but not sure this will do what I want. I'll keep reading up on this, but if someone can point me in the right direction that would be great.

In a past project we had the same type of problem, but with jpegs.

The solution was to add the unix modification time to the src path

<img src='/image/bulk.jpg?112344324' />

anything after the question mark will get ignored by the browser. Except that the browser will think that it is a new URL that it has never seen before and it will call to the server for a fresh copy of the file.

Jim Lucas

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to