+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 10 of 12

Thread: By-pass html conditional re-direct?

  1. #1
    ButtermilkJack's Avatar
    ButtermilkJack is offline Wannabe Geek ButtermilkJack will become famous soon enough
    Join Date
    Feb 2006
    Location
    Dublin, Ireland
    Posts
    269

    Default By-pass html conditional re-direct?

    I have a small html re-direct set-up on the homepage of one of my sites. The redirect catches IE6 uses and sends them to a page where I tell them how bad IE6 is . However, I have a button which lets them go back and browse the site anyway. Needless to say they just end up gping in circles because once they go back to the homepage it sends them back to the IE6 bashing page.

    My question is, what's the easiest way to by-pass the IE6 conditional html if they are coming from the IE6 page?

  2. #2
    Forbairt's Avatar
    Forbairt is offline respect my AW-THOR-IT-AYY Forbairt will become famous soon enough Forbairt will become famous soon enough Forbairt will become famous soon enough Forbairt will become famous soon enough Forbairt will become famous soon enough Forbairt will become famous soon enough Forbairt will become famous soon enough Forbairt will become famous soon enough Forbairt will become famous soon enough Forbairt will become famous soon enough Forbairt will become famous soon enough
    Join Date
    Jun 2007
    Location
    My Office, Dublin
    Posts
    2,285

    Default

    Hmmm what language are you using on the server ? ... have a session and set a flag in it ... if the flag exists don't include the ie redirect ... ? else ...

  3. #3
    ButtermilkJack's Avatar
    ButtermilkJack is offline Wannabe Geek ButtermilkJack will become famous soon enough
    Join Date
    Feb 2006
    Location
    Dublin, Ireland
    Posts
    269

    Default

    Cheers Forbairt. I'm using php. My knowledge of php is very basic but I'll have a look at using sessions.

  4. #4
    Forbairt's Avatar
    Forbairt is offline respect my AW-THOR-IT-AYY Forbairt will become famous soon enough Forbairt will become famous soon enough Forbairt will become famous soon enough Forbairt will become famous soon enough Forbairt will become famous soon enough Forbairt will become famous soon enough Forbairt will become famous soon enough Forbairt will become famous soon enough Forbairt will become famous soon enough Forbairt will become famous soon enough Forbairt will become famous soon enough
    Join Date
    Jun 2007
    Location
    My Office, Dublin
    Posts
    2,285

    Default

    The basics ...


    Each page you have starts a session (first thing you do in your php)... (if you don't ... php forgets about who the user is even if you start it again in a page or two )

    First time ... session variable isn't set through the [if ie6 statements you've got set up

    Gets redirected to page ... asks do you want to view it anyways ... goes to page and sets session saying yesido=true; add it as a session variable

    Back on your main page .... its refreshed and you check .. is this set ... if it is .. don't print the ie6 statement block ... else print it ...

    simple enough .. will require a bit of fiddling / testing though ...

    just remember ... start the session on each page you've got

  5. #5
    d-tour's Avatar
    d-tour is offline Coder d-tour will become famous soon enough
    Join Date
    Apr 2007
    Location
    Cork
    Posts
    82

    Default

    Send them to the redirect page, when they press back have a conditional php statement checking what their referrer page was....

    If it was your ie6page let them in.
    Sessions are a better choice, but only if they allow them.
    Another option is to send use the GET method.

  6. #6
    Forbairt's Avatar
    Forbairt is offline respect my AW-THOR-IT-AYY Forbairt will become famous soon enough Forbairt will become famous soon enough Forbairt will become famous soon enough Forbairt will become famous soon enough Forbairt will become famous soon enough Forbairt will become famous soon enough Forbairt will become famous soon enough Forbairt will become famous soon enough Forbairt will become famous soon enough Forbairt will become famous soon enough Forbairt will become famous soon enough
    Join Date
    Jun 2007
    Location
    My Office, Dublin
    Posts
    2,285

    Default

    isn't the session automagically appended to the URL (GET) if they don't allow sessions ?

    Should probably have said ...

    Create a cookie with a 1 year time out (again as dtour has pointed out assuming they allow cookies)

    This way the next time they hit the site after closing the browser they won't be asked do you want to continue.

    BTW excluding IE6 is a bad idea (drawing attention to it) ... given the amount of users that still use it.

  7. #7
    ButtermilkJack's Avatar
    ButtermilkJack is offline Wannabe Geek ButtermilkJack will become famous soon enough
    Join Date
    Feb 2006
    Location
    Dublin, Ireland
    Posts
    269

    Default

    Cheer for the help folks. I'm don't want to exclude IE6. I'm actually working on a workaround for the menu it breaks at the moment so the IE6 page is really a temp measure until I get the fix sorted. So, bearing that in mind I'd rather spend my time trying to fix the css for the menu for IE6 than trying to get the IE6 page working.

    Anyway, I've just removed the redirect and placed the 'Save the developers' javascript in there for the moment . Probably not the best idea as it's a client site and not my own but I'll remove it once I get the fix done.

    Thanks again!

  8. #8
    d-tour's Avatar
    d-tour is offline Coder d-tour will become famous soon enough
    Join Date
    Apr 2007
    Location
    Cork
    Posts
    82

    Default

    Much better solution, what the CSS issue?
    Much better to have a seperate css file for IE6 users.

  9. #9
    ButtermilkJack's Avatar
    ButtermilkJack is offline Wannabe Geek ButtermilkJack will become famous soon enough
    Join Date
    Feb 2006
    Location
    Dublin, Ireland
    Posts
    269

    Default

    It actually turned out to be quite simple enough to fix the css. It was to do with a drop-down menu and IE6 stretching the li elements out to the full width of the div, whereas Gecko browsers treated width: auto as the width of the a tag inside the li.

    Schoolboy error

  10. #10
    d-tour's Avatar
    d-tour is offline Coder d-tour will become famous soon enough
    Join Date
    Apr 2007
    Location
    Cork
    Posts
    82

    Default

    Keep sending them to the redirect and tell them how bad your css is

+ Reply to Thread
Page 1 of 2
1 2 LastLast

Similar Threads

  1. Email marketing compared to direct marketing.
    By JCB in forum Email Marketing
    Replies: 30
    Last Post: 15-01-2009, 04:43 PM
  2. HTML - Useful Links
    By blacknight in forum HTML Basics
    Replies: 3
    Last Post: 23-06-2008, 07:29 PM
  3. Direct Admin & MySQL databases...
    By Zascar in forum Webmaster Discussion
    Replies: 3
    Last Post: 14-08-2007, 12:29 PM
  4. Signatures no longer direct links?
    By dude in forum Forum Feedback, Development and Competitions
    Replies: 4
    Last Post: 04-04-2007, 05:17 PM
  5. Converting HTML to RSS?
    By blacknight in forum Coding Help
    Replies: 3
    Last Post: 05-02-2006, 07:06 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Optimization by vBSEO

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64