Tested on IE7 and IE9.
Here is a useful way to change the resolution of Internet Explorer if you need to test
a webapp on a specific resolution. It is pretty useful if you do not want to change the OS settings and/or if you need to test several resolutions.
In IE, you create bookmarklets which are JavaScript scripts that are intended to be run from a web browser’s bookmarks bar or menu.
- Add a favorite (shortcut : CTRL+D)
- Choose a name (for instance : 1024×768)
- Display the favorites
- Right-click on the favorite and edit its properties
- Add the URL : javascript:(function(){ window.resizeTo(1024,768); })();
- Click OK. On IE7, you get a warning message (“JavaScript is not a recognized protocole”). Ignore it.
Follow the same steps to add another bookmarklet for another resolution.
Then to change the resolution, you just need to select the favorite.
I quickly tried it on Firefox 10, it does not work. If anyone figures it out, please let me know.
Did Firefox take away the ability to use javascript: in the address bar ?
javascript:alert(7*45) does not even work in FF 10 (?!?)
Some discussion that i found on the matter : https://bugzilla.mozilla.org/show_bug.cgi?id=688841