[whatwg] Save a web page
Lachlan Hunt
lachlan.hunt at iinet.net.au
Fri Jul 2 04:37:31 PDT 2004
voracity wrote:
> I see. You're concerned that an author will offer a document/program on
> the condition that the user can only save with it in a certain way.
Yes, but I'm more concerned that the author will be given control
over something that is entirely the responsibility of the user agent.
>> Also, would modificatoins only affect the saved document, or would it affect the
>> document as they're viewing it?
>
> The document as they're viewing it.
Ok, so in the example I gave earlier, after they saved the document,
they would only see that one paragrah that said "Sorry, you cannot save
this document" (assuming I didn't make any mistakes in the script)
> Note that my original thought ... was that the UA would
> serialise the DOM tree out to markup, AND it would store the value of
> all script variables...
In what file format? Would that be (X)HTML? If so, how do you
intend it to store the state of all the script variables? Or would it
be some kind of binary representation that stored everything in memory,
including the DOM tree, script variables, etc. into a file stream?
> However an onSave would mean the document author could optimise the save
> function to only save the required script variables,
How exactly would this be possible? Scripts don't have access to the
user's file system, and can't work with, nor have any control over a
file as it's being saved, so how do you expect a script to determine
which variable are seialized, and written to the file?
> ... so that file size doesn't blow out. The downside is that the author
> has to work out what to save and how.
How would it possibly blow out? It's a web page, so obviously it's
going to be quite small. Most web pages, especially standards compliant
pages are no bigger than about 100k (including markup, css and script,
but excluding images), often much smaller, so what real benefit would
any optimization have?
--
Lachlan Hunt
http://www.lachy.id.au/
lachlan.hunt at lachy.id.au
More information about the whatwg
mailing list