Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Some question is unclear for me: there are often uses way to call cgi or pl script via image tags(in statistic loggers, etc). But sometimes these scripts use also a small transparent image. What is purpose of that pixel.gif, if script called directly from an image tags??

<img src="http://www.yoursite.com/cgi-bin/logs.pl" height="1" width="1">

Replies are listed 'Best First'.
Re: simple question
by ikegami (Patriarch) on May 03, 2005 at 14:25 UTC
    Not everyone has access to their server logs. The workaround is to call a script which does the logging. In order to call the script, a common trick is to place it in an image tag. The script will get called everytime the page is loaded, unless the browser ignore the images. In order to avoid displaying a broken image icon, the script returns an image to the browser to satisfy its expectations. Some scripts return a small logo; some scripts return a tiny invisible gif in order to avoid adding clutter to the embedding page.
    A reply falls below the community's threshold of quality. You may see it by logging in.