in reply to Seeking ideas for measuring rendered html size

Ok, this whole thing makes about as much sense to me as it seems to be making to everyone else but here's an approach that might work.

  1. write the HTML out to file 'X' but before you do that, add a JavaScript function (triggered by onLoad) and wrap the body of the page in a div with an id 'Y'
  2. have your script fire up a browser and on its command line give it the URL of file 'X'
  3. when the JavaScript function is called, have it query the height and width properties of div 'Y' and submit these details to a CGI script
  4. have the CGI script signal your original script that it's all over and the browser process can be killed.

With Mozilla remoting, you can instruct an already running browser process to load a particular URL so I guess you could skip steps 2 and 4. Step 1 could be done on the fly by a CGI script. You could use CSS to set the width of div 'Y' to be fixed and then measure the height.

  • Comment on Re: Seeking ideas for measuring rendered html size