Question: I asked [how I can resize the browser window with JavaScript](https://stackoverflow.com/questions/7022787/can-i-resize-the-browser-window-size). Everybody told me not to do it. Why is this a bad practice?

I think sometimes it can be good. For example, I want to show users a tweeting popup page. After a user tweeted, I want to redirect him to twitter main page to let him verify his tweet. But tweeting page is small and main page should be big. In this case, making the browser window bigger seems good for user. Am I wrong? Then how should I do in this case?

**Update**

I think I need to make somethings clear.

1. I also don't want my browser to be resized. Resizing users' browser is usually bad. What I want to know is that there could be some case it can be good.
2. I also don't like popups. But as @zzzBov said, pop-outs are different. That is used in many websites even in Stack Exchange(You can see share buttons under the favorite button). I don't think it would be better if those buttons were jQuery modal dialog.

And, JavaScript `resizeTo` function can resize the browser. When I tested that function, it works well in browsers but Chrome. In Chrome, it works just in popups. I might be wrong, but I guess Chrome team also may thought that the `resizeTo` function would be needed in popups.

**Update2**

Most people just don't want the method `resizeTo` to be used anytime and anywhere. I think if that method were totally evil and useless, the browsers vendors had already disabled that method, but they didn't. 

In Chrome and Opera, the `resizeTo` method is available just in popups, and in Firefox users can disable it manually. I'm sure that one should be very careful when using the method. But I believe this method can be useful in some case.

Answer: 
You shouldn't do anything that overrides what the user has previously chosen. Your application is hosted inside the browser windows. It doesn't own the browser window therefore it shouldn't do anything to it.

The same logic dictates that you shouldn't override any browser behaviour such as the back button.

In fact you shouldn't force the windows of your own application to change size. The user has chosen the size and placement of the window for their own reasons which you don't know.

The user won't expect your application to change the size or position of the window - therefore it follows the [principle of least astonishment](http://en.wikipedia.org/wiki/Principle_of_least_astonishment) to do nothing.

> 
> "People are part of the system. The design should match the user's experience, expectations, and mental models."
> 
> 
>
You're taking control away from the user. For example; If the twitter page changes the browser to a small window and they then change their mind before actually tweeting and choose the 'back' browser button they're then left with a small window and have to sort it out themselves back to a size they want it to be.

It's also unexpected behaviour; you don't want to surprise them by having the window do something they don't expect. Users are suspicious when the browser takes over so you risk them closing it down thinking 'a virus has taken control of my pc'.