I am loading pages using AJAX and changing the browser address bar accordingly for a smooth experience.
My doubt is if the browser address bar should change when the new page is called by the user (when he interacts with an element like a click in a link) or once the page starts appearing?
Some things to consider:
- The page fades out with transitions the content that is going to be replaced
- The new content enters with a fade in
- The page might give a timeout error (some problem and it couldn't load correctly)
- The page might not actually exist anymore (404)
- Some seconds might pass before the content arrives
I have reasons for both of the options but I'm not sure if points 3 and 4 should weight more. Also if the case was 4, should the address change at all?