/    Sign up×
Community /Pin to ProfileBookmark

Reload Page Once

Is there a way to reload / refresh a page when it loads? I am dealing with session variables and I am having trouble getting them back from the host unless I refresh the page. I have tried

<META HTTP-EQUIV=”refresh” CONTENT=”1; URL=http://www.website.com/page.php“>

but that is a continuous loop. I just want to have the page refresh once only on body load.

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@ricpApr 16.2007 — Right, I am going to ask first off, "why do you need to reload the page only once?"

The reason I ask is not because it can't be done, it can and easily, but everytime someone has asked me to provide a solution to this, the reason they need it is a piece of bad logic and there was a more sensible solution than it needing a specifically numbered reload.
Copy linkTweet thisAlerts:
@aymelekauthorDec 17.2007 — It has been a while since I've been here, and am running into this problem again. The reason for the page refresh is because I have multiple php scripts on different pages that will grab data from a mysql database. The information then gets cached and when the user goes to the next page, the information does not change unless the user hits the refresh button. I want to automatically refresh the page only once so the data will be fresh every time they go to the page.

I am only having this problem in IE, it works just fine in FireFox. I have tried putting the

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">

<META HTTP-EQUIV="Expires" CONTENT="-1">

tags in the page, but that does not work either. Any ideas?
×

Success!

Help @aymelek spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.21,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...