[fr] a demo of tclhttpd content compression using zip deflate respectively ====== the tcl part, PATH/custom/filename.tcl package require vfs::zip proc repeat {x n} { global Httpd set sock $Httpd(currentSocket) upvar #0 Httpd$sock data #append newline as separator set text [string repeat $x\n $n] set data(headers) [list content-encoding deflate original-len [string length $text]] return [vfs::zip -mode compress $text] } Direct_Url /repeat ::repeat ====== the browser part, e.g. as PATH/htdocs/fox.html ======

functional in Firefox and Opera differently

sets the source attribute of the iframe to "repeat?x=sometext&n=counter"
x and n are the parameter names used in procedure repeat of tclhttpd-server

url

text to echo times repeated

| replaces newline in var A
====== ---- !!!!!! %| [Category TclHttpd] |% !!!!!!