Homepage > htmldu Deutsch

htmldu

What htmldu does | Requirements | Download | Usage | Example output | TODO list | Improve htmldu

What htmldu does

htmldu is a command line tool written in Perl that determines and outputs the size of one or more HTML files or pages including all requisites (or resources), e.g., images, CSS, Javascript, to view the page or pages. The name htmldu stems from the fact that htmldu's output is similar to du's. With htmldu you can easily determine the total size of your web pages without having to examine every file referenced by your HTML file by hand. htmldu is especially interesting for those who create web pages and try to make sure that users with a low bandwidth connection to the internet can download them in a tolerable amount of time by keeping the size of their pages below a certain threshold.

Requirements

For using htmldu having a working Perl interpreter is of course required.

Download

htmldu is released under the GNU General Public License (GPL).

Usage

Usage: htmldu [OPTION]... [HTML-FILE]...
Print size of HTML-FILEs and their resources (e.g. embedded images).

  -r, --remote-resources  determine size of remote resources, too
  -h, --help              display this help and exit
  -V, --version           output version information and exit

As HTML-FILEs can be given: regular files or URLs of remote files. URLs
must include the protocol part. Most of the time that is "http://".

If only one HTML file is given, its size, the size of each of its
resources, and the total size in bytes are printed.

If multiple HTML files are given, the total size in bytes of each HTML
file is printed.

Examples:

    htmldu index.html
    htmldu -r http://www.gnu.org/
    htmldu -r index.html about.html misc.html http://www.gnu.org/

Example output

$ htmldu index.html 
7154   jan.png
3660   index.html
10814  total

$ htmldu -r http://www.gnu.org
13676   http://www.gnu.org/
5286    http://www.gnu.org/graphics/gnu-head-sm.jpg
1763    http://www.gnu.org/gnu.css
20725   total

$ htmldu -r http://www.debian.org
16704   http://www.debian.org/
8442    http://www.debian.org/Pics/debian.jpg
4929    http://www.debian.org/sponsor_img.jpg
2404    http://www.w3.org/Icons/valid-html401
759     http://www.debian.org/logos/openlogo-nd-50.png
507     http://www.debian.org/Pics/getting.en.gif
451     http://www.debian.org/Pics/devel.en.gif
365     http://www.debian.org/Pics/sitemap.en.gif
353     http://www.debian.org/Pics/red-lowerleft.png
351     http://www.debian.org/Pics/support.en.gif
344     http://www.debian.org/Pics/red-upperright.png
321     http://www.debian.org/Pics/red-upperleft.png
315     http://www.debian.org/Pics/search.en.gif
299     http://www.debian.org/Pics/red-lowerright.png
296     http://www.debian.org/Pics/about.en.gif
294     http://www.debian.org/Pics/blue-lowerleft.png
290     http://www.debian.org/Pics/blue-upperright.png
287     http://www.debian.org/Pics/news.en.gif
280     http://www.debian.org/Pics/blue-upperleft.png
266     http://www.debian.org/Pics/blue-lowerright.png
38257   total

$ htmldu -r index.html http://www.gnu.org http://www.debian.org
38257   http://www.debian.org/
20725   http://www.gnu.org/
10814   index.html
69796   total

TODO list

Improve htmldu

Feel free to send suggestions, bug reports, or patches to <jan@bretti.net>.


prepBut nI vrbLike adjHungarian! qWhat's artThe adjBig nProblem? - Alec Flett at Netscape


Jan Bretschneider  <jan@bretti.net>

Created on: 2004/07/25
Last modified on: $Date: 2006-10-24 14:14:29 $