Click to See Complete Forum and Search --> : refresh


simflex
12-24-2002, 08:09 AM
I am not good with javascript but i have an urgent requirement.
any time you go from one page to another, chances are that the page you left may have been updated.
When you return to that previous page, the only way to see an update to that page is to hit the refresh button.
Is there anyway ( I am sure there is) that I can have a page that I am returning to refresh automatically as soon as I return to that page?
thanks in advance

khalidali63
12-24-2002, 08:42 AM
In your browser setting look for a setting for the browser to reload the page everytime you get there,typically or by default it will cache the page and reload it from cache.

Khalid

pyro
12-24-2002, 09:08 AM
This should work for you. <body onLoad="window.location.reload()"> When you load your page, it will automatically reload it.

khalidali63
12-24-2002, 09:12 AM
great....kinda lost that you might be looking for a JavaScript code..lol

Thanks pyro

Khalid

swon
12-24-2002, 09:14 AM
Pyro, this will load the document every time, without a break

pyro
12-24-2002, 09:44 AM
Right you are. Hmm...

swon
12-24-2002, 09:49 AM
I think, but I'm not sure, there is an meta tag named no cache or something, maybe that's the solution...

khalidali63
12-24-2002, 10:14 AM
yes u r right here is the meta tag that will take care of it
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">

Khalid

Zach Elfers
12-24-2002, 03:26 PM
If you keep the page form being cached, the next time you visit the page, it will have to load all over again and it won't be stored in memory. This might make your site too slow.

pyro
12-24-2002, 04:03 PM
Yes, it will have to load the site every time, thus slowing it down, but it will update his content, which is what he wanted to do.

simflex
12-26-2002, 07:00 AM
thanks gurus for all the info.
this is really appreciated!!

simflex
12-26-2002, 08:18 AM
good coders, let me tell you what this code:

<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">

is doing.
It is reloading automatically.
Although I want it to reload automatically but only when I hit the "back" button.
Right now, when I go to page2, it forces itself back to back page1; that is not what i want.
thanks again!!!