resizeBy might give you better mileage, resizeTo includes browser chrome which can differ depending on toolbars.