It will be very annoying for those who don’t know where to find the option in their browser to turn off your ability to do that.
It will also totally mess up all the other pages loaded in the other tabs in their browser at the same time - even worse if some of those pages do the same thing.
The resizeTo() function is disabled in Safari (Chrome too, I think) unless you open a popup which contains only the one page (i.e. provide a width and height for the pop-up window). Of course, this may be blocked by ad/ pop-up blockers.