Sitecore and Sitecore Commerce Architect
An Alternative To The Evils Of The Incognito Window
An Unnecessary Evil
We've all done it, there's no need to be ashamed.
You're working on an Item in Sitecore and you instinctively press the Ctrl-Shift-N keyboard shortcut to open an Incognito window to test your work.
We've seen countless compatriots use the same approach. Even the Sitecore training documentation suggest we do so. However, the very nature of an Incognito window makes it inappropriate for testing:
- No browsing history is saved
- Cookies are deleted when the Incognito window is closed
- Local and Session storage are cleared when the Incognito window is closed
- Unless there's a requirement for testing Incognito windows, your clients most likely won't be browsing your application in one.
If anyone tried to sell you a testing tool, and the fine print elucidated the points above, I don't think you'd find it very useful.
A Better Way
The better way is Browser Profiles.
A Browser Profile is a local, autonomous, distinct user account for your browser. A Browser Profile has its own history, cookies, local and session data store, plugins, bookmarks, etc., and are dead-easy to setup and use.
Some of the ways I use Browser Profiles are:
- Creating a unique Browser Profile for each of my Sitecore Personas:
Now I can test a single pages' personalization for multiple personas simultaneously.
- Creating and testing new Sitecore Roles:
One Browser Profile can be authenticated as a Sitecore Administrator, and the other Browser Profile can be authenticated as the Sitecore Role under development.
- Effective ad-hoc testing:
Browser Profiles overcome all the shortcomings of Incognito windows, as they are normal browser sessions.
- An endless supply of "clean" sessions:
Which are unsullied by my application's cookies, session data, and browsing history.
- An easy way to test browser plugin interactions:
Simply create a new Browser Profile, install the problematic plugin, and test.
When your done testing, you can delete the Browser Profile
[All browsers support Browser Profiles](https://www.howtogeek.com/139705/how-to-use-multiple-browser-profiles-in-any-browser/ "Opens a new browser to HowToGeek.com"). I'll walk you through creating one in Chrome:
Open Chrome and click the little profile icon in the upper right hand corner, underneath the "Maximize" button.
In the image below, my profile icon is the ninja:
In the menu that's produced, click the Manage People menu item:
Which will produce the Add Person dialog. Click the "Add Person" button in the lower right hand corner:
In the resulting dialog, give a name to your new Browser Profile and select an image.
Assure that the "Create a desktop shortcut for this user" checkbox is checked, and click the "Add" button.
Below, I'm creating a new user named "Ganesha", and have selected the origami Elephant image:
A new browser window will open, using your new Browser Profile. In the image below please note that the little profile icon is the same as my new Ganesha profile's:
You can now use the desktop shortcut for quick access, but there is a better way. We can use the Chrome keyboard shortcut chord of Ctrl-Shift-M. All we need do is reprogram a single finger.