page refresh how simple

Gordon.C

Member
Hello

I am sorry to disappoint you, my issue is unfortunately not that simple (at least to for me)

I want on my web-site on every single relocation to refresh the page so the cookies take place and the page is drawn up-to-date...

If i do JavaScript command
Code:
[COLOR="red"]<body onLoad="*whatever refresh*">[/COLOR]
the page continues to refresh every second...

If I do the same with
Code:
[COLOR="red"]<body onUnLoad="*whatever refresh*>[/COLOR]
Opera and mozilla firefox are not able therefore relocate (quite strange)

When I use PHP sign:
Code:
[COLOR="Red"]<META HTTP-EQUIV='Refresh' CONTENT='3;'>[/COLOR]
That is the most appropriate for all explorers but that has other issues what I am aming for is:
The page will refresh only once whenever it is relocated... (just after clicking the hyper-link)

Thanks everybody for patience any help highly appreciated
 
huh... confusing! It sounds like you want it to refresh the page once when you go there, so that the cookies are the way you want them.

ok dude, there is probable a better way of doing this than having the page refresh! So if you want to explore other options, tell use why you need the refresh in the first place.

I'm guessing that the cookie(s) are being set by Javascript, and that you need to read the cookie(s) with a server side script like PHP.

If what I said is true, here is a possible workaround:
Problem: Lets say you want to display a date/time on the page and you want the time to be relative to their time zone. You could have javascript find the clients UTC/GMT offset, then set a cookie with the time offset and have PHP read the cookie and make a relative date. The problem is that the page has to load the javascript first and by then, it's too late to have PHP check the cookie! Solution: Have Javascript check to see if the Time Offset cookie is set, and if it is set check to make sure that the offset is accurate. If it is set and is accurate, load the page normally. If the cookie is not set or is not accurate, set the cookie and reload the page with window.location.reload();


holiday :)
 
Back
Top