# Session lost with IE7 but not FF... 8 hours hit head/wall

**URL:** <https://www.ruby-forum.com/t/session-lost-with-ie7-but-not-ff-8-hours-hit-head-wall/149839>\
**Category:** Rails\
**Created:** [September 30, 2008, 1:38pm UTC](https://www.ruby-forum.com/t/session-lost-with-ie7-but-not-ff-8-hours-hit-head-wall/149839 "2008-09-30T13:38:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrpete](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ac91a4/32.png) [@mrpete](https://www.ruby-forum.com/u/mrpete)\
**Post date:** [September 30, 2008, 1:38pm UTC](https://www.ruby-forum.com/t/session-lost-with-ie7-but-not-ff-8-hours-hit-head-wall/149839/1 "2008-09-30T13:38:52Z")

</div>

Our production site works great on IE7/FF but SAME code on test server  
fails for IE7…works great with FireFox. We’ve spent 8 hours on this  
problem now about we’re about to jump off bridge.

I appears cookies are lost with IE7. I’ve seen another post here but  
not a solution.

Our development.log shows:

Redirected to [http://beta.mysite.com/login/login](http://beta.mysite.com/login/login)  
Filter chain halted as [:authorize] rendered\_or\_redirected.

A Microsoft post says to set the domain for the session cookie. Does  
anyone know how to do that for Rails?

Any other feedback would be GREATLY appreciated.

Pete

---

<div class="post-metadata">

**Author:** ![mrpete](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ac91a4/32.png) [@mrpete](https://www.ruby-forum.com/u/mrpete)\
**Post date:** [September 30, 2008, 1:44pm UTC](https://www.ruby-forum.com/t/session-lost-with-ie7-but-not-ff-8-hours-hit-head-wall/149839/2 "2008-09-30T13:44:28Z")

</div>

Hope this link helps you:

> **[Cookie handling in multi-domain applications in Ruby on Rails](https://szeryf.wordpress.com/2008/01/21/cookie-handling-in-multi-domain-applications-in-ruby-on-rails/)**
>
> My team is working on a multilingual multinational application in Rails (I know this sounds incredibly pushy but bear with me). The application is at susuh.de if you want to have a look at it, but …

Regards

Peter A. escribiÃ³:

> Filter chain halted as [:authorize] rendered\_or\_redirected.
> 
> A Microsoft post says to set the domain for the session cookie. Does  
> anyone know how to do that for Rails?
> 
> Any other feedback would be GREATLY appreciated.
> 
> Pete

/\*\*

- [dagi3d.net](http://dagi3d.net) v4 - [http://dagi3d.net](http://dagi3d.net)  
\*/

---

<div class="post-metadata">

**Author:** ![mrpete](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ac91a4/32.png) [@mrpete](https://www.ruby-forum.com/u/mrpete)\
**Post date:** [September 30, 2008, 1:45pm UTC](https://www.ruby-forum.com/t/session-lost-with-ie7-but-not-ff-8-hours-hit-head-wall/149839/3 "2008-09-30T13:45:05Z")

</div>

I would take a step back and try running the test server in  
“production mode” by simply changing the database.yml. This can get  
the apples to apples comparison even closer and might yield different  
results. Rails behaves a little different in my experience in each of  
the modes.

Also look at your session storage mechanism if not file based.

H

On Sep 30, 7:38 am, Peter A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![mrpete](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ac91a4/32.png) [@mrpete](https://www.ruby-forum.com/u/mrpete)\
**Post date:** [October 1, 2008, 3:49am UTC](https://www.ruby-forum.com/t/session-lost-with-ie7-but-not-ff-8-hours-hit-head-wall/149839/4 "2008-10-01T03:49:47Z")

</div>

Thanks for your suggestions!

We figured it out. IE misbehaves if the subdomain has an underscore in  
it. Ours did.

Pete

---

<div class="post-metadata">

**Author:** ![mrpete](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ac91a4/32.png) [@mrpete](https://www.ruby-forum.com/u/mrpete)\
**Post date:** [October 1, 2008, 4:55am UTC](https://www.ruby-forum.com/t/session-lost-with-ie7-but-not-ff-8-hours-hit-head-wall/149839/5 "2008-10-01T04:55:02Z")

</div>

Peter A. wrote:

> Thanks for your suggestions!
> 
> We figured it out. IE misbehaves if the subdomain has an underscore in  
> it. Ours did.
> 
> Pete

Actually, some would argue that IE did the right thing, sort of, and  
that Firefox misbehaved. I ran into the same problem a number of months  
ago with Safari. Firefox worked, but Safari didn’t. It was the same  
problem. A couple of people posted and pointed out that the RFC for URLs  
does not permit underscores in the hostname (what you are calling the  
subdomain, I think). The funny part is that if the browsers were  
completely standards compliant, the web sites shouldn’t work in them at  
all. In my case (and I think your’s), you can access the web sites, but  
it’s the cookie that’s failing.

Peace.
