Click to See Complete Forum and Search --> : temporary internet files


srujankk
March 7th, 2006, 05:19 AM
i have a html file which includes an external js file

<html>
<head>
<script src="sample.js">
</script>
</head>
<body>
This is for test
</body>
</html>

now when i access this html file the extenal js file gets loaded into the temporary internet files......Is there any process with which i can restrict the js file from being downloaded onto the client system in the temp. internet files folder.

thanks in advance

wildfrog
March 7th, 2006, 05:37 AM
Is there any process with which i can restrict the js file from being downloaded onto the client system in the temp. internet files folder.
What web server are you using? Most servers let you specify caching/expiry options for single or groups of files.

Or, if you're generating the file yourself (through some kind of CGI) you might want to read this: http://www.rfc.net/rfc2616.html#s14.9.

A less pretty (and usually working) way to force 'reloads' is to add a dummy variable to your url, like this:

<script src="sample.js?dummy=12345">
Now, give that dummy a different/random value each time you load the page. This should trick the different layers of cache...

- petter