The JavaScript window object provides the resizeTo(), resizeBy(), moveTo() and moveBy() methods for resizing and moving the current browser window. You should almost never need to use them and should not expect them to work when you do use them though. Ever since browsers introduced tabs where the one browser window can display more than one web page independently at the same time they also introduced the ability to have the browser ignore any move or resize requests. After all with more than one page being displayed in the same window at the same time it would be inappropriate for one of those pages to resize or move the window and impact on the other pages displayed. After all what happens if you are displaying two pages and one wants the browser to be 400 x 300 pixels and the other wants it to be 600 x 400 pixel - which of the two should the window be set to? Far easier to just let the browser owner decide how big they want their browser window to be and where they want it placed.
If you are opening a new window you will have a slightly better chance of being able to specify the size and position of that window by ehtering top, left, width, and height values into the third parameter but even there they are just recommendations and the browser can ignore them.
For those rare cases where the browser will accept these commands here's how you would resize the browser to 800 by 600 pixels and position it in the top left of the screen.
window.resizeTo(800,600);
window.moveTo(0,0);
