Resource optimized window resize event