hie
everytime, here is some ways 2 do it:
<META HTTP-EQUIV="expires" CONTENT="-1">
<META http-equiv="Pragma" content="no-cache">
<META http-equiv="Cache-Control" content="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="Mon, 06 Jan 1990 00:00:01 GMT">
but looks like it wont work always-aldays..
here is what microsoft suggests 2 us 2 prevent files from cachin: have 2 head sections in the document:
<html>
<head>
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<title>!!no cache</title>
</head>
<body bgcolor="#FFFFFF">
</body>
<head><META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"></head>
</html>
but it doesnt work for me too :-(
well, u might add current time or random number to the url, so, page wont be cachin..
<script>
var tmp=Math.floor(Math.random()*10);
top.location="mypage.html?"+tmp
</script>
here is what i do 2 prevent some of my scripts from cachin:
<script language="javascript">
var time_now=new Date();
var secs=time_now.getSeconds()
document.write("<script language=\"javascript\" src=\"scripptt.js"+"?time="+secs+"\">"+"</"+"script>"
</script>
this wuld prevent those script from cachin, u can do the same with any url;
but
IE won't let you access a url when it's not part of your domain (it's a violation of security). - so, u can do that with ur urls only
regards, vic
The suggested trick using
<script language="javascript">
var time_now=new Date();
var secs=time_now.getSeconds()
document.write("<script language=\"javascript\" src=\"scripptt.js"+"?time="+secs+"\">"+"</"+"script>"
</script>
Does not alwayas work if placed in an asp environment. Also, with Netscape browsers, it may give you a run time error. This is surprising since asp is client-side independent. Any one know a possible explanation?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.