-
Notifications
You must be signed in to change notification settings - Fork 174
back & forward navigation #12
Comments
Thanks for reporting! I'll get this fixed. |
Which browser are you using? Can't duplicate this in Safari. |
I've tried this in the latest Chrome (and Firefox as well) on winxp. |
Hmm, I'll look into fixing it. Thanks! |
I think this is due to the browser caching the ajax request when rendering the partial for your comments. So naturally, when you go back, it'll use the browser cache which just so happens to be the rendered partial markup code from the ajax request. |
have the same issue with Chrome 15.0.874.106 running on Ubuntu (awesome!) |
I don't know is this already fixed in PJAX or not, but to prevent this you should disable caching of PJAX responses with something like this: # if request is from PJAX
self.headers['Cache-Control'] = 'no-cache, no-store, max-age=0, must-revalidate'
self.headers['Pragma'] = 'no-cache' By the way, I have written similar to PJAX gem, that is easier to use (from my point of view) and already has some of PJAX problems fixed: https://github.com/igor-alexandrov/wiselinks. |
Hi, yes, the problem appears when pjax is mixed with the regular browser's requests. If the URL used for both is the same google chrome will cache the last one. The given solution though does cause the full page reload when user clicks browser's back button, thus I simply added You do not need to push that additional parameter to the history state thus it does not appear anywhere and stays invisible to users. |
this puts you back to the main page, instead of "show notes"
another problem appears if u now press "forward" in the browser, an AJAX reply appears without being properly handled
The text was updated successfully, but these errors were encountered: