Rails session cookies not saved in IE 6/7 ?

I spent half an hour surfing the net for an answer and luckily found this page: Problems with IE7 Sessions Not Saved in Rails or PHP

So basically if session cookies (or any cookies for that matter) work just fine on Safari/Firefox, but just get silently ignored on Internet Explorer - please check if there are any underscores in sub-domain you are accessing.

For example, I was using domain called 'amtes_shop.local' for my Rails application, and I could never "shop" for anything because cart was using sessions, and sessions were silently ignored by IE 6/7 (so I was in the latest stage of development when one tests everything on broken browsers ;) Renamed amtes_shop.local to amtesshop.local - and everything magically fixed itself! Bingo!

4 Responses to “Rails session cookies not saved in IE 6/7 ?”

  1. itpatil Says:

    Thank you !

    That's quite annoying. I spent about an hour trying to find a solution for why IE is not accepting cookies from the subdomain, but FF and other browsers are working fine.

    Thanks again.

  2. Norgg Says:

    Oh god, that's so annoying, got hit by this big time, thanks so much.

  3. renuka Says:

    Hi,

    I am also getting same problem.
    In site domain i dont have any underscore but still client is getting problem to login in site.

    Can anyone help me?

    Thanks in advance.

  4. Jason Says:

    Thanks for the post! I thought I was gonna go crazy trying to tweak my code.

    FYI, it's also a problem in IE 8.

Leave a Reply