Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cookies Not Consistently Being Shared Across Tabs In IE

got a rather strange problem that I'm sure is a browser setting, so whilst it isn't strictly a programming issue, I was wondering if people here had come across it during their development work and could suggest a solution/cause.

My app is in MVC 2 and runs a central menu system with the links to the actual app screens all having a target="_blank" and so open either in new windows or new tabs, depending on how the user prefers through their browser settings. This all works fine on every system we use it on, apart from a new one - we're setting up a new Citrix desktop and we are getting strange behaviour when testing it. We can log on, ok, and navigate through the menus, but when we hit the menu links 90% of the time the new link opens with the login challenge, as if the browser no longer has the session cookie. However, when we go back to the main tab we are still logged in and can navigate around the menus fine. The other very odd thing is occassionally I can load a screen ok in the new tab and run it fine, but then opening it again from the menu fails and we again get the login challenge. Once I log on to one new tab, the rest open fine, which is even stranger.

I'm guessing this is some sort of tab isolation setting, but as it doesn't always seem to work. if there is one is it known to be a bit buggy? The browser is IE 8, which we use on all the other systems, fine. Any group policy settings that could be causing this as it happens on a user's login we're testing with, but not mine - I'm waiting on our network admin to get back to me regarding any GP differences between admins and users, but I thought I'd ask in here in case he can't see anything obvious.

Cheers - MH

like image 523
Mad Halfling Avatar asked Oct 15 '12 11:10

Mad Halfling


People also ask

Do cookies persist across tabs?

Cookies have nothing to do with tabs or windows -- they have to do with requests to a domain. Whenever the browser makes a request to a webserver for a domain, any cookies that it has for that domain will be sent in the request header.

Do IE and Edge share cookies?

The first time an Internet Explorer mode tab is created in a Microsoft Edge session, all matching cookies are shared to the Internet Explorer session. After that, anytime a cookie that matches a rule is added, deleted, or modified it's sent as an update to the Internet Explorer session.

How do I manage cookies in Internet Explorer?

Internet ExplorerClick 'Tools' (the gear icon) in the browser toolbar. Choose Internet Options. Click the Privacy tab, and then, under Settings, move the slider to the top to block all cookies or to the bottom to allow all cookies, and then click OK.

How do I enable cookies on Windows 10 Internet Explorer 11?

Enable cookiesScroll down to Cookies, and select Don't block cookies Internet Explorer In Internet Explorer, in the menu bar, select Tools > Internet options > Privacy > Advanced. Select Accept or Prompt under First-party Cookies, and Accept or Prompt under Third-party Cookies. Select OK.


1 Answers

It turns out this is an IE bug (no real surprise there) - when the browser spawns a new tab in a new worker process the new process doesn't have access to the session cookie. A few other people have found this and stopping the spawning of new processes, though not a great solution, seems to fix the issue. Note that this issue also occurs on the Yahoo website, and all other sites that use session cookies. Really not sure which combination of events and situations trigger this (on our system is only hits non-admin users - we've looked through our GPO rules but haven't found anything obvious), but I reckon MS really need to fix it because if it starts to trigger more often it could completely cripple IE.

Here's the link to temporarily bypass the issue, if you get hit by it, yourself.

http://blogs.msdn.com/b/askie/archive/2009/03/09/opening-a-new-tab-may-launch-a-new-process-with-internet-explorer-8-0.aspx

like image 159
Mad Halfling Avatar answered Oct 08 '22 06:10

Mad Halfling