Re: How to figure out if a page has already been loaded
- From: "J.O. Aho" <user@xxxxxxxxxxx>
- Date: Sun, 20 Nov 2005 16:47:42 +0100
Stefan Mueller wrote:
>> You could ID each page with an ID number and store the ID number in your
>> session, if the ID number from the session is the same as the pages, then
>> don't generate a new number.
>
> Yea, of course, I can store my random numbers within $_SESSION["..."]. I
> didn't realize that $_SESSION["..."] is a session variable. I was only
> focused on $_SESSION["count_session"].
>
> Many thanks
> Stefan
>
>>> PS: I don't like to use cookies
>> Session is a cookie.
>
> Does that mean that if a user disables cookies on this browser my page won't
> work?
> What will happen? Error message?
If cookies are disabled, it's will each time a page loaded result in that
isset($_SESSION["count_session"]) will be false, and your script will try to
set a new session but it will be ignored by the browser.
You should include a cookie check in your page (this could be done with
javascript and result in an alert if it notice that there hasn't been a cookie
set and tell the user that the site needs cookies to work properly, of course
the user could have disabled the javascript too and this case you can use a
reference check, if it notice that the reference is to your pages and it don't
find a cookie it could generate an error message to the page where telling
about cookies, but references can be turned off too).
//Aho
.
- Follow-Ups:
- Re: How to figure out if a page has already been loaded
- From: Ray Paseur
- Re: How to figure out if a page has already been loaded
- References:
- How to figure out if a page has already been loaded
- From: Stefan Mueller
- Re: How to figure out if a page has already been loaded
- From: J.O. Aho
- Re: How to figure out if a page has already been loaded
- From: Stefan Mueller
- Re: How to figure out if a page has already been loaded
- From: J.O. Aho
- Re: How to figure out if a page has already been loaded
- From: Stefan Mueller
- How to figure out if a page has already been loaded
- Prev by Date: Re: How to figure out if a page has already been loaded
- Next by Date: Looking to hire somone to build web element
- Previous by thread: Re: How to figure out if a page has already been loaded
- Next by thread: Re: How to figure out if a page has already been loaded
- Index(es):
Relevant Pages
|