use location.href to store last location locally