IE Forgets Cookies on Sub-Domains with an Underscore
- September 23, 2009 8:49 AM
- Browsers, Microsoft Tools, Software, Mystery Error Message
- Comments (11)
Ok, so one more reason to hate IE: Internet Explorer fails to hold cookies when viewing URLs that have a sub-domain with an underscore. I found this when the project I'm developing just refused to hold on to a session when viewing the site from Internet Explorer. Almost all of the server-side technology I was using was new to me, so I lost a full day trying to figure out if it was ColdFusion 9, IIS7, or the ColdFusion on Wheels framework that was breaking the sessions before I found out that the IE browsers choke on underscores. FireFox and Chrome didn't care about the underscore, but IE6 through IE8 lost their session because they couldn't hold onto the cookies for the site.
So, if you're loosing your sessions in Internet Explorer, check your URL. I'm not sure if there are other characters besides an underscore that would cause the cookie loss, but it wouldn't surprise me.
This post is also partly just to provide an answer for any one trying to figure out why there sessions might be disappearing in IE: I did a lot of Googling for various terms trying to figure out what was going on, and it wasn't until *after* I figured out what was going on that I was able to find a post or article stating that an underscore in the sub-domain was the cause of the problem.
Thanks for the post! It seemed unbelievable that this was happening with a site I developed... have never seem that mentioned before.
Surely if Microsoft implements any standard, it will do just half part of it, and poorly. Ridiculous!
It's very helpful. I had same problem, and after rename my machine, all work.
That being said, it is odd that the site will work fine with the exception of cookies not working correctly. It would have been a lot easier to figure out if the site didn't work at all. And like you said, it wasn't until after I figured it out until I was able to use the right search terms to find anything about it.
Anyway, to the people defending MS...we're all developers here, right? When you get invalid input, do you ignore it and continue to work with crippled functionality that results in weird downstream behavior that's very tough to debug, or do you pop up a message box informing the user of their mistake? Please tell me it's the latter.
If it's the former, might I suggest the following: http://careers.microsoft.com/