views:

233

answers:

1

I have this basic javascript code: window.resizeTo(1000,800) set to run when the page loads and it works perfectly in Firefox but not in Safari.

Thanks in advance!

+5  A: 

The browser blocks this, quite intentionally. Please don't try to resize the user's window, this will only lead to them hunting you down with a salad fork.

Keep in mind that most browsers by default use tabs, what gives your site the right to resize my other tabs? When you think about it from the users' point of view, you should see why browser makers have intentionally started blocking this unwanted behavior (at least at the top/tab level, resize what you want inside your own page, e.g. an <iframe>).

Nick Craver