GeeCON Prague 2014*
The moose likes HTML, CSS and JavaScript and the fly likes caching the js file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "caching the js file " Watch "caching the js file " New topic
Author

caching the js file

vishnu nandimalla
Greenhorn

Joined: Aug 03, 2001
Posts: 1
Hi, I have a jsp page inside which iam calling js file ,and this page contains some images also.I am using no cache pragma tag to prevent cache in my jsp file,how ever i observed webserver log file , when ever i ask jsp file ,it down loads the jsp file and js file,but not the same case with images(that means images are caching.)i want to cache my js file,at the same time i dont want to cahe my jsp file,is it possible? i wrote jsp like <%response.addHeader("Pragma", "No-cache"); response.addHeader("Cache-Control", "no-cache"); response.addDateHeader("Expires", -1); %> <SCRIPT LANGUAGE="JavaScript" SRC="myscript.js"></SCRIPT> ... etc any help is greatly appreciated Thanks vishnu
 
GeeCON Prague 2014
 
subject: caching the js file