Pop-up windows now survive when you close the original tab

Jun 11, 2010 12:14 GMT  ·  By
Pop-up windows now survive when you close the original Gmail tab in Google Chrome
   Pop-up windows now survive when you close the original Gmail tab in Google Chrome

Gmail has recently updated an interesting feature especially useful for email ‘powerusers.’ Certain portions of the email app can be opened in new, dedicated windows, handy for those who like to multitask. The feature was made much faster in an update a couple of months back. There was still one issue with this, though, if you closed the main tab, all those other windows would be closed too. Now, thanks to a bit of HTML5 magic and a little help from the Chrome team, this won't happen anymore.

“I recently posted about Gmail's fast new windows and explained that the only downside of them was that they closed when the main Gmail window closed. Today, we're changing that. If you're using the latest version of Google Chrome, you can now continue to work in popped out windows after you close your main window (especially handy for those of us who always like to keep an eye on our tasks),” Michael Davidson, software engineer at Google, wrote.

You can now compose an email in a new window and close the regular Gmail app. You can even have multiple windows like this open. This only works in Chrome for now, but, since the feature is based on HTML5, it should be easy to implement in other modern browsers as well.

Behind the scenes, when you close the Gmail tab in Chrome, the code behind the app gets ‘transferred’ to the remaining window seamlessly. This means that Gmail remains in memory even if you’re accessing only a portion of the app.

“When the window that hosts the code fires an unload event, we move the iframe with the code to a surviving window. Everything continues to run, including timers and outstanding requests,” Davidson explained. There’s one caveat, though, this doesn’t work for chat windows, at least for the moment. You can open a chat box in an outside window, but you can’t close the original Gmail tab without closing the pop-up window too. Of course, an integrated tab feature in Gmail might also come in handy.