Window id – Practical use cases

This post is part of the window id concept series

The concept of a window id.

The window id is sent as request header by the browser and let you identify the window which sent a request.

Request Header
-—————-
X-Window-Id: 279078917624897

Having this window id, we can store data for a specific window in the user session.
The great advantage of such an id is that we can build more stable multi window web application. In this article, I will describe a number of practical use cases.

Until the id is included in browsers, we can enhance the browsers using a plugin. I build a plugin for Firefox but could provide one for other browsers as well.

I have described the concept in Mai 2009 in an article in this blog.

Use cases

Current menu

Imagine you have a menu to navigate in your web application which allows to open a menu group and select a page to navigate to. It could look like the following sample of JQuery UI or the one of JSF Richfaces.

If the user press ‘Reload page’ or submits data, you won’t to show the menu groups opened which were opened before as well. As a consequence, you need to store the information somehow.
How do you achieve this?

One approach could be to save the information in the page template and open the appropriate menu group.

<meta name="xOpenMenu" content="foo">

+ is simple and works with current browsers
- doesn’t work with multiple open menus. Think of applications like Photoshop or Gimp with a number of menus which can be opened to work with layers, colours, …

We could store the information in the users session.
+ is simple and works with current browsers
- does not work if you want to use the application with multiple windows
Best solution

This is a great use case for the windows id concept. If the browser sends the window id with every request, then you can store the information, which menus are open, per browser window in the user session.
Help needed
If you went to get this into browser, then you can help achieving this.

  1. Comment on this and show practical use cases in your own blog.
  2. Vote for Firefox bug Vote for bug https://bugzilla.mozilla.org/show_bug.cgi?id=495395.
  3. Add a ‘+1’ to the mailing list thread of Webkit (Safari/Google Chrome) on mailing list topic
 [webkit-dev] Browser issue with multiple tabulators.
  4. Contact Opera/Microsoft

Best Regards / Viele Grüße

Sebastian Hennebrueder