Using local storage instead of a cookie to store current sorting state on main page