Access a window by window name

In firefox (might work in other browsers too, but now it’s not my concern) I was able to reference one window accross multiple page loads with

var w = window.open("", "nameofwindow");

This opens new window if it doesn’t exist and return reference to existing window if it does exist without changing contents of the window.

With jQuery I was then able to append new content, to make quick collection of interresting links like this

$('body', w.document).append(link_tag);

Leave a Comment