Use popstate event instead of interval to check for navigation back.
Fix bug with caching params.