Prevent browser tab from freezing while submitting