In a previous post I talked about how going porn-mode on your browser is great for a developer. What I didn’t realize until today is that incognito mode is not as unique as I want it to be.
We use localStorage in one of the applications we are developing and I had issues when I was opening up multiple Chrome Incognito mode browsers, assuming they were unique….I wanted to compare separate instances in separate windows
Mr. Genius (Toby) pointed out to me that localStorage is shared amongst Incognito windows – and that was causing things to screw up for me.
This is simple to demonstrate – open up an incognito window
Then go to a site (http://demo.xomino.com) in my case
Open up developer, go to the console and create a localStorage item (.marky in this case)
Then open a new incognito window, go to the same site and check out the Resources, localStorage. As you can see from the image below – the second incognito window has the localStorage values that were created in the first one.
It also appears that cookies are shared between then as well – they are not at all unique.
Good to know !! Bad for my testing
PS
I was dared to call this post “multiple porn windows…sharing porn.”…..I resisted 😉
In Chrome, you might create multiple profiles for different test identities (never tried for development though). https://support.google.com/chrome/answer/2364824?hl=en
For firefox: Check this fantastic plugin. http://br.mozdev.org/multifox/
I’ve always used the approach of different Chrome profiles as Serdar mentioned – but I’ve never tested it with localStorage.
Just tested, it keeps seperate local storages for separate profiles, as expected 🙂
Sweet thanks 🙂