[Pmwiki-users] Editing long pages

Patrick R. Michaud pmichaud
Thu Oct 28 08:38:18 CDT 2004


On Thu, Oct 28, 2004 at 07:20:22AM -0600, Patrick R. Michaud wrote:
> [...]
> One "simple" solution to this *might* be to make 'pre-chunk' and 
> 'post-chunk' into hidden fields of the edit form, so that PmWiki
> doesn't have to recompute them when the post occurs, but doing it
> this way may be making a strong (and incorrect) assumption about 
> browsers' ability to store hidden fields with very long string values.

And having now checked into this a bit more, early versions of HTML noted
a 1024 character limit on attribute values.  In HTML 4.1 the SGML capacities
apparently raise this to 65536 characters, but there's also a note
that browsers "should avoid imposing arbitrary length limits on attribute
value literals" (http://www.w3.org/TR/html4/conform.html#h-4.1).

I haven't found anywhere that publishes actual browser limits (if any),
so experimentation may be the only way to know for sure.  I've put up
a little test script at http://www.pmichaud.com/sandbox/attrlimit.php
that tries to find out where a browser's particular limit may be.
It starts by sending a form containing an attribute of length 512;
pressing "Try it" will tell the browser to submit that form and return
another form with the attribute doubled in size to try again.  If at
any point the browser returns the attribute with a different value
than what was sent, then we've hit a limit.

To prevent this from eating up all of the available bandwidth on my 
hosting account, the script stops increasing the chunk size at 128K 
(at this point I think we can assume that any browser limits are no 
longer an issue), and I'll be taking the script off-line after this weekend.

So far I've tested it with Firefox PR 1.0 and IE 6.0 (Win XP, SP 2) 
and not run into any problems.  If others could run the test with their
browsers and report the results back to 
http://www.pmwiki.org/pmwiki2/pmwiki.php/Development/BrowserLimits
it could *really* speed implementation of a "section edit" capability.

Thanks,

Pm



More information about the pmwiki-users mailing list