Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Eddie Foreman 215 posts 288 karma points
    Oct 15, 2010 @ 12:51
    Eddie Foreman
    0

    redirect based on cookie value

    Hi All

    Looking to create a disclaimer page, that a site visitor needs to agree to before viewing any pages.  This needs to work regardless of the page that the visitor lands on or may have previously booked marked. My initial thought was to use a cookie and the page load event.  If the cookie is null, then redirect to the disclaimer page.

    Is there a cleaner approach that I could use, possibly with an xslt?

    Thanks again

    Eddie

  • Rik Helsen 670 posts 873 karma points
    Oct 15, 2010 @ 15:12
    Rik Helsen
    0

    Do you still want searchengines to be able to index the website? then your approach isn't very good...

    just a though, but how about making the site only available to logged in members, and make the "login page" contain the disclaimer ?

    You would have to create an "agree" button that logs the user in though, but that shouldn't be an issue...

     

     

  • Eddie Foreman 215 posts 288 karma points
    Oct 15, 2010 @ 15:29
    Eddie Foreman
    0

    Hi Rix

    Good point about the SEO.

    Unfortunalty the site contains content that is available to all users.  The disclaimer is a legal requirement for the site, so I need a way for users to agree to the disclaimer before viewing any content. 

    Need to have a re-think

    Thanks

    Eddie

  • Rik Helsen 670 posts 873 karma points
    Oct 15, 2010 @ 15:36
    Rik Helsen
    0

    Suggestion 2:

    How about an indexable teasertext for each page, with a button below it "I agree with the terms and conditions" to check the rest of the page content (dhtml slide-out)

    Search engines see the teasertext, and you can write a cookie when they click the button so the complete text appears for all future pages ?

    Suggestion 3:

    Show the page content, use javascript to overlay the terms and conditions

    - in case of a search engine, the javascript won't execute -> google indexes the page

    - in case of a visitor, they need to click away the t&c

     

     

  • Eddie Foreman 215 posts 288 karma points
    Oct 16, 2010 @ 15:41
    Eddie Foreman
    0

    Hi Rik

    First thanks for your suggestions, number 3 looks a good choice.  But if javascript is disable, then the disclaimer can be bypassed.

    Not sure if its possible, but I'm going to try mimic suggestion 3 and display the disclaimer in a fixed asp:panel with an asp:AlwaysVisibleControlExtender to ensure that the disclaimer is always displayed until accepted. Got the idea after looking at this: http://www.asp.net/ajaxlibrary/act_AlwaysVisible_Simple.ashx.    Again a cookie will be used to control the disclaimer.  Hopefully this approach will also allow search engines to index the pages. 

    Please let me know you see any flaws with this approach.

    Thanks again

    Eddie

  • Rik Helsen 670 posts 873 karma points
    Oct 18, 2010 @ 10:26
    Rik Helsen
    0

    crawlers don't execute most client-side stuff, so i don't know what happens when you click "accept disclaimer", but if the content isn't already visible in the source html of your page, search engines won't be indexing much...

Please Sign in or register to post replies

Write your reply to:

Draft