How to detect multiple window usage in JS

2009-03-01 00:15:26
3 comment(s)

When designing a web application, one should keep tabbed browsing in mind, because this is one of the greatest features in browser-history. So great that even Microsoft had to implement it in IE!

But sometimes using an application in multiple windows or tabs just doesn't make much sense, and can be expensive. For example a chat or IM application (like Meebo) polls the server nearly in every seconds, and doing that simultaneously in more tabs or windows is simply wasting resources on both server and client side. In such situations a script to detect multiple window usage and notify the user can come handy. Let's see, how to do that.

Details...

Tags: web php javascript window name