|
|
 |
|
|
Pages: 1
HTML Code Needed to Automatically Refresh The Page
(Click here to view the original thread with full colors/images)
Posted by: preitzes
I run a free online journal with a buddy and we do the html ourselves. This is truly a labor of love!
We would like to find some general or generic html code that can be used so that every time someone clicks on our journal, it automatically refreshes the page. We have many subscribers who write us and say that every time they visit our page to see the new issue, they get the previous issue. So we always write back and ask them to click the “refresh” button which always works.
Can someone provide us with code so that when our page is bookmarked or re-visited, the page refreshes?
Thanks so much!
Posted by: Canis Lupus
Try these:
Via an onclick event (refreshes when you click on the link):
Code:
<a href="javascript:location.reload()">refresh this page</a>
Via META expire control between your <head></head> tags(refreshes everytime page is loaded)
Code:
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Expires" content="-1" />
The first two are so that the visitor doesn't cache the page, hence they always get the latest data. The third one is so that the browser will automatically get new data from the server.
Good luck!
- CL
Posted by: eleanorstang
What he said.
Posted by: preitzes
thanks guys! so much!
|
|
|
|
|