The resize event is fired every time the window is resized. There is no guarantee how often the event will fire. The browser may decide to resize as soon as the mouse cursor drags the corner and continues to do so until the mouse is released so that it can constantly redraw the contents. The last event is the one that is taken into account when you release the mouse button.
This can happen if the browser window is maximized by double-clicking. The OS may decide to animate the contents of the window by firing several resize events in the browser. A browser that wants to redraw accurately can propagate events further, thereby causing a double size, even if the animation is very fast.
As Kir Ivlev suggests, you can wait a little after each resize to see if another resize will occur. If so, extend the wait (stop waiting and wait again)
source share