Safari and – How to do it

Posted by filed under Browser Struggle.

There is still some traffic coming in from people who are searching for how to deal with the safari popup blocker. So I thought it might be nice to also tell what you can do about it – as most people want solutions, not backgrounds…

So, here you go:

It’s pretty simple, really. What to do? Well, call while the popup blocker still allows it, and store a reference to the window object. Then, later, do with it what you want. That is, changing the location in most cases.

Huh, that’s all? No magic? Nope, sorry. The popup blocker’s rules cannot be bent.

Say, you have a connection like this (I stay with the example code of the prior post):


Then call in your subscription:

dojo.subscribe('/opener/callOpen',function() {
    var winRef =;
        url: window.location.href,
        load: dojo.hitch(opener,function(){

And let your open() know there might be a window object coming in:

opener = {
    open: function(windowReference) {
        var newWin = windowReference ||;
        // see if we get a window object

In case your new window will be open and visible for some time until you can work with it, don’t forget to let the user know that the window will get some content in a few, e.g. point the new window’s url to some nice “please wait” page.

One Response to Safari and – How to do it

  1. […] Update: If you are interested in how to make work you might want to also read the follow-up: Safari and – How to do it […]

[Comments are automatically closed after 30 days.]

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.