Resize Firefox Window With Bookmarklet

Advertisement

firefox resize

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.

firefox resize

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.

firefox resize

Step 3

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

firefox resize

Related Contents

Sponsors

Posted by hongkiat in How-To , at 02.08.08

Tags: , , ,

Comments

  1. CincauHangus February 8th, 2008

    that’s handy =)

    Reply
  2. Syahid A. February 8th, 2008

    Excellent tip Hongkiat. Resizing Firefox while maintaining Windows resolutions is quite cool.

    Reply
  3. Ashish 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

    Reply
  4. danny February 11th, 2008

    very useful.

    Reply
  5. paskal February 13th, 2008

    wow never found this on other site.. good info.. :D

    Reply
  6. BoltClock February 13th, 2008

    I tried it, and it works in Firefox 2.0.0.12 but not in Firefox 3 beta 3.

    Reply
  7. hongkiat February 13th, 2008

    BoltClock: You are right, that’s reason #2 why I still stick with Firefox 2 for now.

    Reply
  8. Charles 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)

    Reply
  9. MRosefelt March 3rd, 2008

    Thanks for publishing this.

    Reply
  10. Darwin 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. :)

    Reply
  11. Chris 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.

    Reply
  12. OperaFan 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.

    Reply
  13. Siam June 19th, 2008

    Resizing in firefox 3 works now. I was going crazy when it didn’t work in beta. :)

    Reply
  14. fox 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?

    Reply
  15. demian July 14th, 2008

    great tip, thanks!!

    Reply
  16. Gordy July 17th, 2008

    Welcome to 1997.

    Reply
  17. Eli 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:
    javascript:self.moveTo(0,1);self.resizeTo(screen.availWidth,screen.availHeight-25);

    Reply
  18. 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.

    Reply
  19. sandrar September 11th, 2009

    Hi! I was surfing and found your blog post… nice! I love your blog. :) Cheers! Sandra. R.

    Reply
  20. megan fox September 11th, 2009

    Sign: umsun Hello!!! rcuwwymhyw and 63ssgfhphzye and 6663Cool!

    Reply
  21. Bob21 October 22nd, 2009

    Toolboxes are my freedom and independent of my daily hassles. ,

    Reply
  22. Sad49 October 23rd, 2009

    Islam will force into bringing about just as surely as the sun will rise. ,

    Reply

Leave a reply