tags:

views:

645

answers:

5

Hi Friends

My requirement is pretty interesting, I want to maintain one cookie between two different browser for same domain.

so lets say I have create one cookie with name "mydata" and value "hiscal" from IE, then if i browse same website from firefox and trying to read cookie "mydata" then system should give me value "hiscal"

but this is not happen in general case

so can any one tell me how i can share cookie between to different browser(client) of same domain.

Thanks, Hiscal

A: 

You can't do it.

Why do you want to do this?

Noon Silk
Hi friends, Thanks for your reply and comment, I want to implement flash player same as http://www.reverbnation.com/ flash player, this web site flash player maintain single playlist for flash player and don't concern with browser from where song add in player playlist, if i am going to delete the cookie of any browser playlist is going to clear , so I am sure that player used cookie to maintain playlist.so there is some way by which we can shared cookie between different browser
Hiscal
+1  A: 

Every browser maintains it's own cookies. So in general, no this is not possible.

With a lot of hard work you could in theory write an application that sits on the client computer that looks at all the locations the different browsers store cookies, parses the different cookie formats, synchronises them and then writes them out.

That would be error prone and will break as soon as a browser changes how it works with cookies (not to mention that some of the browsers secure their cookies, so you won't be able to get to them in the first place).

In my opinion, this is not practical and I wouldn't even try.

Oded
That is a terrible terrible suggestion.
Noon Silk
@silky - I do say that in my answer...
Oded
That being said, I'd definitely *like* having my cookies for different browsers the same. Heck, after all, to the user the *website* remembers who you are, not the browser. Of course, the implementation tells a different tale but I don't consider this segmentation to be very good from a user standpoint.
Joey
Johannes: I hate it; it's great for testing where you can have a browser that is "clean" from cookies, and so many other reasons. It just makes no sense at all to remotely consider how to do this, as far as I'm concerned. And @Oded, you only said it was 'error prone' (not 'a bad idea'), but you've slightly expanded the comment in your edit I think.
Noon Silk
@silky - yes, I agree that it's a bad idea, so edited the answer to reflect that.
Oded
@silky: well, for testing there is New Session in IE and probably similar methods in other browsers. Still, try explaining to someone why Amazon remembers them in FF but not IE but a Flash game has their save games in both of them. I don't disagree that there are uses for that kind of browser separation, I just argue that it's confusing for the bottom 99 % of computer users :-)
Joey
Hi friends, Thanks for your reply and comment, I want to implement flash player same as http://www.reverbnation.com/ flash player, this web site flash player maintain single playlist for flash player and don't concern with browser from where song add in player playlist, if i am going to delete the cookie of any browser playlist is going to clear , so I am sure that player used cookie to maintain playlist.so there is some way by which we can shared cookie between different browser
Hiscal
A: 

It can be done with other data storages, thorugh browser extensions. Maybe in Flash or Google Gears you can maintain shared DB between browsers, but it's need to be installs on both of them, of course.

Edit:

In Google Gears tou can't. Maybe you should write self-made extension... or some user-login system, where the data will sit on the server.

Y. Shoham
+2  A: 

You can build a cookie-proxy by creating a Flash application and use Shared Objects (SO = Flash cookies) to store data.

Any Browsers with Flash installed could retrieve the informations stored in the SO.

But, it's an ugly workaround.

Just don't share cookies... and find another way to build your website/app.

Fro_oo
Hi friends, Thanks for your reply and comment, I want to implement flash player same as http://www.reverbnation.com/ flash player, this web site flash player maintain single playlist for flash player and don't concern with browser from where song add in player playlist, if i am going to delete the cookie of any browser playlist is going to clear , so I am sure that player used cookie to maintain playlist.so there is some way by which we can shared cookie between different browser
Hiscal
A: 

Use YUI's storage utility and force it to use the SWF storage engine.

All computers and browsers would still have to have Flash installed, but you wouldn't have to write your own Flash app. You would benefit from using the one maintained by the YUI team.

As others have said, this is not very portable, but in a controlled environment, it might work for you.

abjennings