Quantcast

Jquery, AJAX, back button

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Jquery, AJAX, back button

John Moore
Not a Grails question per se (I hope people don't mind), but highly relevant to Grails web applications, and I'm hoping to draw on people's experience from AJAX-ifying their Grails applications. I'm working on an app at the moment where it's proving much neater to refresh areas of the page via AJAX with Jquery than to go to a whole new page. The downside is that the Back button no longer works as it should - the standard AJAX problem. There are a bunch of plugins out there for Jquery which help with this, although it's possible to control the history without the use of a plugin (albeit in a way which runs into cross-browser compatibility issues). I'm just wondering what others have favoured, as I assume that I'm far from the first Grails developer to run into such issues.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Jquery, AJAX, back button

Dean Del Ponte-2
The winning answer on Stackoverflow to this question was jQuery Address.
Looks pretty solid.

- Dean Del Ponte

On Thu, Jun 7, 2012 at 4:20 AM, John Moore <[hidden email]> wrote:
Not a Grails question per se (I hope people don't mind), but highly relevant
to Grails web applications, and I'm hoping to draw on people's experience
from AJAX-ifying their Grails applications. I'm working on an app at the
moment where it's proving much neater to refresh areas of the page via AJAX
with Jquery than to go to a whole new page. The downside is that the Back
button no longer works as it should - the standard AJAX problem. There are a
bunch of plugins out there for Jquery which help with this, although it's
possible to control the history without the use of a plugin (albeit in a way
which runs into cross-browser compatibility issues). I'm just wondering what
others have favoured, as I assume that I'm far from the first Grails
developer to run into such issues.

--
View this message in context: http://grails.1312388.n4.nabble.com/Jquery-AJAX-back-button-tp4629730.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Jquery, AJAX, back button

bobbywarner
PJAX also updates the URL and preserves back-button functionality.  Here's a blog post I wrote recently about how to use PJAX in a Grails app:

http://www.bobbywarner.com/2012/04/23/add-some-pjax-to-grails/


Hope that helps!
Bobby
Loading...