Grow your CSS skills. Land your dream job.

Redirecting to a Splash Page but Only Once – Cookies

  • # January 20, 2010 at 5:43 am

    Re: http://css-tricks.com/redirecting-to-a- … h-cookies/

    Hi Chris:

    Thanks for your cookie redirect code. I’m trying to implement it on my website, http://www.billyjoeconor.com .
    However, although the function works fully, too much time elapses before the redirection takes place, in which time the initial page (index.html) loads and displays about half way before the redirected page (welcome.html) appears.

    Would you please let me know what must be done in order that the redirection takes place sooner, before the initial home page (index.html) is able to load and partially display as it is doing now?

    Below is my configuration in the code as in the example shown on your website:

    Code:


    When the cookie is not found, I need the redirect to go to welocome.html. When the cookie is found I need the initial page index.html to continue loading and displaying.

    Thanks,

    Billy

    # January 20, 2010 at 10:51 am

    Seems to me it taking that long because it needs to load jquery, load the cookie plugin, execute the code and all that, which page rendering doesn’t wait around for. If you wanted to to happen before any page loaded at all, you’d have to skip doing this with JavaScript and look into doing it with just PHP alone. Should be too touch, just research how to set and read cookies, and how to redirect a page with PHP.

    # January 20, 2010 at 3:11 pm

    Thanks for the info. I’ll look int it.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".