Added option to update session on resize and made <IE9 compatible