TL;DR - AJAX URL redirect breaks 'pageinit' and any subsequent 'pageinit's that occur after the redirect
(see https://stackoverflow.com/a/14469041/2133816 for information on pageinit)
How to recover from this?
In Detail:
My mobile site has user accounts, so when a homepage button is selected that requires a user login it will first try to access the site in question...
m.smellyeggs.com/stuff?id=2497349187324&tr=454543522525
But once it is detected that the user has not logged in, the site reroutes the user to...
m.smellyeggs.com/login
Sadly, this event breaks functionality for all pageinit events:
$(document).on('pageinit', function(){
// things are done here
});
So after a redirect event occurs, no more pageinit events are detected, and unfortunately my data is loaded from the cache.
How can I recover from a "broken" pageinit, specifically occurring after an AJAX redirect.
Thank you!