If you have a Google account, you can save this code to your Google Drive.
Google will ask you to confirm Google Drive access.
Save file as:
If you have saved a file to Google Drive, you can open it here:
Try to resize the browser window.
Note: this example will not work properly in IE8 and earlier. IE8 and earlier do not support the outerWidth/outerHeight propery of the window object.