Safari - is there a way to set a preferred screen size?

As the title says, I would like new windows to open in a set screen size. I believe that the default is that they open in the size of the last window. Sometimes, I want to make a window smaller for some reason, but I want new windows to open as usual. Is there a shell script/command to accomplish this? Thanks


Solution 1:

I use the following bookmark, which you can create as many as needed, to resize my safari window to a specific size:

javascript:self.moveTo(0,0);self.resizeTo(1250,screen.availHeight);

This moves the window to the far left, top and then makes the width 1250 pixels and makes the hight fill to the available (limited by the dock hight, if not hidden).

To use, bookmark any page and then edit the address with the code above.

Every now and again, an update to safari will break this, and then it'll work again after a subsequent update.

Solution 2:

There is a great extension available for Safari called ResponsiveResize which works great for me: http://www.midwinter-dg.com/downloads_safari-extension_responsive-resize.html