
When we resize Firefox browser on our screen, it’s probably because the browser is blocking something at the back or we want to fit more browsers on the screen. Resizing manually by dragging the edge usually does the job, but here’s few situation manual resizing may come tedious:
- Resize to 800×600 for screen capture
- Preview web design in a 1024×768 browser screen.
- Place 3 250×100 browsers side by side on a 1024×768 screen
To resize Firefox browser to a specific size you can do it with Javascript, and with the use of Firefox bookmarklet (or bookmarking) resizing can be done in just one click.
Creating a Resizing Bookmarklet
Step 1
Right click on Bookmark Toolbar -> New Bookmark to launch the Bookmark dialog box.

Step 2
Insert the following into the box:
- Name: Give a descriptive name if you are planning to add several bookmarklet.
- Location: Place javascript:window.resizeTo(1024,768) into the textfield. Alter 1024 & 768 to create bookmarklet of another size.
Both Keywords and Description can be leave blank.

Step 3
Test your bookmarklet, click and it should resize to it’s specific size.

Related Contents |
Sponsors |
|
Posted by hongkiat in How-To , at 02.08.08 |
|






















Comments
CincauHangus February 8th, 2008
that’s handy =)
ReplySyahid A. February 8th, 2008
Excellent tip Hongkiat. Resizing Firefox while maintaining Windows resolutions is quite cool.
ReplyAshish Mohta February 10th, 2008
Superb, I had been using resizer till now. I guess this is good as we can resize inidvidual thing. A link back coming soon
Replydanny February 11th, 2008
very useful.
Replypaskal February 13th, 2008
wow never found this on other site.. good info.. :D
ReplyBoltClock February 13th, 2008
I tried it, and it works in Firefox 2.0.0.12 but not in Firefox 3 beta 3.
Replyhongkiat February 13th, 2008
BoltClock: You are right, that’s reason #2 why I still stick with Firefox 2 for now.
ReplyCharles E February 15th, 2008
Great idear on the bookmarklet
To get the InnerWidth i use
width+8 & height-20
javascript:window.resizeTo(1024+8,768-20)
ReplyMRosefelt March 3rd, 2008
Thanks for publishing this.
ReplyDarwin March 15th, 2008
Good writeup, I’ve been meaning to post something like this.
Here are some ones I’ve created that I find pretty useful:
Full screen
javascript:window.moveTo(0,0);window.resizeTo(screen.availWidth,screen.availHeight);
Half screen (left)
javascript:window.moveTo(0,0);window.resizeTo(screen.availWidth/2,screen.availHeight);
Half screen (right)
javascript:window.moveTo(screen.availWidth/2,0);window.resizeTo(screen.availWidth/2,screen.availHeight);
Quarter screen (top right)
javascript:window.moveTo(screen.availWidth/2,0);window.resizeTo(screen.availWidth/2,screen.availHeight/2)
Quarter screen (bottom right)
javascript:window.moveTo(screen.availWidth/2,screen.availHeight/2);window.resizeTo(screen.availWidth/2,screen.availHeight/2)
I hope they fix it in Firefox 3 Beta soon. :)
ReplyChris March 27th, 2008
By default, Firefox 3 blocks JavaScript from resizing windows. Go to Preferences, Content, Enable JavaScript/Advanced, Scripts may not move or resize existing windows/Exceptions.
I haven’t really figured out how to add your bookmarks as exceptions, but if your browser is on a site on the exceptions list it will work. I just added google.com (my home page) as an exception. If I want to use a bookmarklet to resize, I have to be load google.com before it will work.
It’s crude, but it’s the only thing I’ve got so far.
ReplyOperaFan May 24th, 2008
Hmmm… doesnt seem to work for me. i put this bookmarklet on the nav bar and as a bookmark. none seems to work.
ReplySiam June 19th, 2008
Resizing in firefox 3 works now. I was going crazy when it didn’t work in beta. :)
Replyfox July 11th, 2008
resizing works in firefox 3 but i can’t get it to move the window so that full screen mode is in the best position. have to drag it into place. is there a fix for that?
Replydemian July 14th, 2008
great tip, thanks!!
ReplyGordy July 17th, 2008
Welcome to 1997.
ReplyEli February 8th, 2009
For firefox 3 moveTo(0,0) doesn’t work but moveTo(0,1) does work.
I use to maximize window while in unity mode with vmware fusion:
Replyjavascript:self.moveTo(0,1);self.resizeTo(screen.availWidth,screen.availHeight-25);
Dave February 25th, 2009
Has anyone figured out how to move it to the left a bit more? There still is some room to the left of the browser. In other words, it doesn’t go all the way to the left part of the screen.
Replysandrar September 11th, 2009
Hi! I was surfing and found your blog post… nice! I love your blog. :) Cheers! Sandra. R.
Replymegan fox September 11th, 2009
Sign: umsun Hello!!! rcuwwymhyw and 63ssgfhphzye and 6663Cool!
ReplyBob21 October 22nd, 2009
Toolboxes are my freedom and independent of my daily hassles. ,
ReplySad49 October 23rd, 2009
Islam will force into bringing about just as surely as the sun will rise. ,
ReplyTrackbacks