Instead of using the setMaxSize function on the window resize method,
use the parse url