Usually the code discussed on this page would be applied to a page that was opened via a target blank anchor tag. Indeed, resizing a normal browser window (instead of a "pop-up" window), may cause your website visitors a certain level of concern.
Resizing the current window however is a simple enough task. All that is required is the function resizeTo() added to the window object:
<body onload="window.resizeTo(400, 400);">
Your content here
As you can see this function is nothing to complex. Here a closer look at the function resizeTo():
window.resizeTo(Width in Pixels, Height in Pixels);