RE: server-side redirect thingy?

by "tim booker" <timbooker(at)btinternet.com>

 Date:  Mon, 12 Mar 2001 21:40:55 -0000
 To:  "'Peter Benoit'" <pbenoit(at)triton-network.com>,
"'Peter Schonefeld'" <peter.schonefeld(at)bigpond.com>,
"'Manish Sharma'" <msharma(at)cityonlines.com>,
"'Hwg-Techniques'" <hwg-techniques(at)hwg.org>
 In-Reply-To:  network
  todo: View Thread, Original
Hey guys,

I've put together a simple PERL script to achieve the effect I want with PNG
images.

As far as I know, the two major browsers that fully support PNG are Netscape
6, and IE 5 on Macintosh.  (Other browsers will display PNGs, but it gets
messy if you're use alpha transparency!).

Check this out: http://timbooker.com/image.html

The PNG image is green, the GIF is blue.

In the source code, I can simply call the script like this:

<img src="/cgi-bin/image.cgi?/test">

The "/test" section is the path to the image, excluding the file extension.
Now I can create 2 images, test.gif and test.png.  The script detects which
browser you are using, and redirects you to a PNG or a GIF accordingly.

This script obviously needs some refining, but it has the effect that I
want.

Thanks to everyone for their feedback.  The reason I want to get this script
working is so that I can use PNGs or GIFs easily, without chopping up my
page using a scripting language such as PHP, ASP, or even client-side using
JS.

Tim


www.timbooker.com

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA