#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2000
    Posts
    34
    Rep Power
    15

    Question


    I have a JavaScript that checks for a cookie and a valid value in that cookie. If it finds neither it redirects the user to another page.

    The problem is that if I can hit stop before the redirect occurs (which takes a few seconds), I can view the page I'm supposed to be sent away from.

    Is there a way I can 'preload' the java script so that it will check for the cookie *before* the rest of the page is loaded? It is already in the <head></head> tags...

    Thanks!

    Joel
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2001
    Posts
    36
    Rep Power
    14

    Lightbulb


    Hi,

    try to make temporary page with detection, where you detect yoyur cookies and then decide where to redirect this man.
    But when you wnat to redirectit in JS - it's not secure - one can alsways be intime and ress Stop and then View Page source and get into both of the pages to be redirected to..

    Ciao

IMN logo majestic logo threadwatch logo seochat tools logo