W3C home > Mailing lists > Public > public-webapi@w3.org > November 2005

Re: Ajax Back/Forward History problem document state by document.save()

From: Karl Pongratz <karlhp@otenet.gr>
Date: Tue, 22 Nov 2005 22:43:23 +0200
Message-ID: <438382EB.20606@otenet.gr>
To: public-webapi@w3.org, kennyheaton@gmail.com, laurent@xulfr.org, jim.ley@gmail.com, annevk@opera.com, sh@defuze.org, derhoermi@gmx.net, lachlan.hunt@lachy.id.au, dbaron@dbaron.org, info@lucamascaro.info

kenny heaton wrote:

> I wonder what everyone thinks of that, or do web developers really
> need the ability to save the state of a page into history so the user
> can go back to it?


It is simple to answer, it depends of the application. In some cases you 
will need it and in others not.

Lets make again a simple example, we have a website which show different 
sales reports, the user selects the reports from a list and is able to 
set specific query parameters. Though we don't load the reports via a 
regular HTTP request but via XMLHTTP in the background, the XMLHTTP 
response is a javascript array from which we generate a table report by 
DOM scripting.

This could be done by standard HTTP, though the report web page is quite 
heavy and instead of loading a 40K - 100K html page for any request we 
only need to load 1K - 10K of data for each different report. This 
results in a faster response and it saves a huge amount of network traffic.

So the user goes from report A to report B, then from report B to report 
C, etc.

Why shouldn't the user use the Back button in this case? And why should 
I as a developer not be allowed to save a specific document state? The 
only way to save document state is by the developer, because the web 
browser hardly knows which state makes sense to be saved.

Can I use document.save() or pushState() for evil? Yes, I can, as I can 
use a simple "a" link for evil or as I can write a simple plain text web 
page and use it for evil.

Undo/Redo will sure be useful, though it simply depends on the 
application type, we should simply accept that there are different kinds 
of applications, from simple to complex, from small to large, from more 
web like to more desktop like or mixed once, etc.

So, my primary intend is only to fix the Back/Next problem first, which 
is strongly tight to the XMLHTTP request staff, something that is simple 
and all browser vendors would be willing to implement. I don't really 
care if it is document.save(), pushState() or something else, it should 
simply work.

Thanks,

Karl
Received on Wednesday, 23 November 2005 01:07:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:18:52 GMT