allBlogsList

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:

  1. No browsing history is saved
  2. Cookies are deleted when the Incognito window is closed
  3. Local and Session storage are cleared when the Incognito window is closed
  4. 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:

  1. Creating a unique Browser Profile for each of my Sitecore Personas:
    Now I can test a single pages' personalization for multiple personas simultaneously.
  2. 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.
  3. Effective ad-hoc testing:
    Browser Profiles overcome all the shortcomings of Incognito windows, as they are normal browser sessions.
  4. An endless supply of "clean" sessions: 
    Which are unsullied by my application's cookies, session data, and browsing history.
  5. 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
  6. Etc...

[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:

  1. 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:

    Profile Image

  2. In the menu that's produced, click the Manage People menu item:

    Manage People

  3. Which will produce the Add Person dialog. Click the "Add Person" button in the lower right hand corner:

    Add Person Dialog

  4. 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:

    Create Person Dialog

  5. 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:

    New Browser Session

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.

- Vic