Skip to content

Ajaxification

Philippe Marschall edited this page Aug 25, 2022 · 3 revisions

Do I have to change my application when using the script? No. When using the script you don’t have to think about AJAX at all. You write a traditional web application and it gets AJAX enabled simply by adding the script. There is no need to change existing code.

If an application has a large amount of almost-full-page AJAX re-draws, will the use of the script make this simpler? Yes, the script centralizes and automatizes these re-draws.

Do I have to remove manually crafted Ajax actions? No, the script assigns a click handler to the body of the document only. This means it is only triggered when the user clicks on a traditional link. Other click handlers in the document continue to work as is.

FAQ

That back button comment sounds just too intriguing. Is it really that easy?

The idea is to put the _k part of the Seaside URL into the fragment of the URL.

Is there any way to force some actions to actually do a traditional full-page refresh?

Yes, by assigning an URL to window.location, or by changing the script to ignore certain anchors.

Will this cause callbacks to continuously accumulate on the server side until an actual full-page refresh?

No. To Seaside the AJAX requests look like normal full-page requests. Therefore Seaside behaves and caches the callbacks as it does with a traditional application.

For the original documentation see:

Clone this wiki locally