Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apache server cache *.js file !! ;-(

Status
Not open for further replies.

tuyle

Programmer
Mar 19, 2001
4
VN
Hi,

I include a JS (javascript) file in *.php page. When I update JS file, and reload *.php again: nothing happen becase Apache server doesn't load the updated JS file.

Anyone can know how to force Apache reload the update JS file?
Thanks,
Tuy Le
 
it could be the server
check your config file for
<IfModule mod_expires.c>
ExpiresActive on
ExpiresByType image/gif &quot;access plus 7 days&quot;
ExpiresDefault &quot;access plus 1 second&quot;
</IfModule>
this should make the gif files cached for 7 days, other file types for 1 second
hope this helps
 
Try reloading youre ms browser with <ctrl><f5> in that way the cached page will really reload. PHP or Apache has nothing to do with the js file.
Try not to include the js with php but with html:
<script src=&quot;script.js&quot;></script> mcvdmvs
-- &quot;It never hurts to help&quot; -- Eek the Cat
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top