This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

refresh/reload Netscape

 
Saeed Yaz
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm having a problem with the reloading of my page in Netscape. I have a frame that needs to be reloaded every minute. I was able to use a meta tag to do this but in Netscape the frame fails to reload and the info in the frame fails to update. The only way I can update the frame is by holding down the shift key while I reload the frame. Is there a way I can simulate the holding down of the shift key while the page reloads? I�ve tried writing applets, and scripts, and I�ve used meta tags which reloads/refreshes every minute. It works great in IE but in Netscape no luck .
Help!! Running out of ideas���..
 
Manish Hatwalne
Ranch Hand
Posts: 2596
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried this?

This is what it does - you create a new url every time by appending it a random value in a query string, which means the browser thinks of this as a new URL and fetches it from the server, rather than from the cache. On the server side however, you do not need to take care of this parmeter of the querystring. Then in onLoad event of body tag, you call this function after 1 minute (60 * 1000 ms). This should work with all (JavaScript enabled) browsers.
Actually meta tag refresh should have worked as well. Did you try using it with "no-cache" tags? Anyway, let me know if this solution works.
HTH,
- Manish
[This message has been edited by Manish Hatwalne (edited October 31, 2001).]
 
Saeed Yaz
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Manish,
Thank you for the response but unfortunately I'm recieving a javascript error that you might be able to help me out with.
This is the error that I recieve when I run the script:
JavaScript Error:
(new Date()).valuOf is not a function.
This is my html page:
<HTML>
<HEAD>
<noscript>
<meta http-equiv="refresh" content="60">
</noscript>
<script type="text/javascript">
function refreshPage(){
var szURL = "http://www.mydomain.com?rand=" + new Date().valuOf();
self.location.replace(szURL);
}
</script>
</HEAD>
<meta http-equiv="pragma" content="no-cache">
<BODY BGCOLOR="#FFFFFF" onLoad="setTimeout('refreshPage()',60000);">
</BODY>
</HTML>
 
Manish Hatwalne
Ranch Hand
Posts: 2596
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Saeed Yaz:
Manish,
Thank you for the response but unfortunately I'm recieving a javascript error that you might be able to help me out with.
This is the error that I recieve when I run the script:
JavaScript Error:
(new Date()).valuOf is not a function.
use new Date().valueOf() here.
This is my html page:
<HTML>
<HEAD>
<noscript>
<meta http-equiv="refresh" content="60">
</noscript>
<script type="text/javascript">
function refreshPage(){
var szURL = "http://www.mydomain.com?rand=" + new Date().valuOf(); // use valueOf() here
self.location.replace(szURL);
}
</script>
</HEAD>
<meta http-equiv="pragma" content="no-cache">
<BODY BGCOLOR="#FFFFFF" onLoad="setTimeout('refreshPage()',60000);">
</BODY>
</HTML>

Sorry, I had made a typo while posting which I corrected later. Probably you took the previous post code. use valueOf() instead of valuOf(), it should work.
- Manish
 
Manish Hatwalne
Ranch Hand
Posts: 2596
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just one more thing,
<meta http-equiv="pragma" content="no-cache">
tag should be in the <head> and </head> section of HTML.
- Manish
 
Saeed Yaz
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Manish,
Thanks for the help, but I'm still getting the same results. The info in that frame just does not update. With the script you gave me it updates once, and grabs the rest from cache. This occurs even withe the <meta> tag cache=0. I'm going to try one more script that I wrote, I'll keep you posted.
~Thanks again............
 
Saeed Yaz
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Problem Solved.
Thank you for your input...............
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic