why is history lost?

But if you can catch the back button with an ajax request and do a special
call to the server
then i think if we separate the versioning in an ajax and normal.
We could do a real redirect or just update the object that are changed.

johan


On 2/8/07, Matej Knopp <[EMAIL PROTECTED]> wrote:

Although there is a drawbacks for this:
  The history would be lost after first page refresh (so that my example
wouldn't even work, unless you don't refresh it :))


Matej Knopp wrote:
> well...
> in theory, if we had special versioning for ajax this magic could work.
>
> On server we would have to maintain page version number and ajax delta.
>
> Let me give you an example:
> You load page with version 3 (url says version=3)
>
> then you click an ajax link (twice)
> on server the page version is 3 and ajax delta = 2. (internally we could
>  store as 5 i guess).
>
> Then when a request comes, with version 3, we would know that we need to
> server the version 5 (3 + 2 ajax delta).
>
> on first backbutton, we would have to call special ajax revert action,
> that would revert the version to 3 + 1 ajax delta and possibly reload
> the whole page (less work to do, we wouldn't have to track dom changes).
>
> on second backbutton we would have to do the same, reverting to 0 ajax
> delta (version 3).
>
> all other backbutton pressed would be treated like regular back button
> presses (no ajax magic).
>
> -Matej
>
>
>
> Johan Compagner wrote:
>> So always remember the last versionnumber for a page that was a normal
>> request
>> And all normal and ajax request to that version number will always
>> give the
>> latest.
>>
>> What we also could do is have special ajax versioning that doesn't up
the
>> version number
>> but can be used in an ajax request to rollback. some thing like:
>>
>> Component[] alteredComponents = page.getVersionManager
>> ().rollbackToAjaxVersion(version)
>> AjaxRequestTarget.add(alteredComponents)
>>
>> johan
>>
>>
>>
>> On 2/8/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
>>>
>>> On 2/8/07, Matej Knopp <[EMAIL PROTECTED]> wrote:
>>> > Eelco Hillenius wrote:
>>> > > Can't we come up with something smart like recording the last
>>> non-ajax
>>> > > request so that when a request for exactly that url comes in after
a
>>> > > couple version changing ajax request we now that we have to
discard
>>> > > version info but just serve the latest?
>>> > And what if user really pressed the back button and really returned
to
>>> > the page with "old" verion number?
>>>
>>> Then you would recognize it is not the same url as before the ajax
>>> request(s) and you would just roll back the whole thing to that
>>> version.
>>>
>>> Eelco
>>>
>>
>
>


Reply via email to