Reply to Re: Why does IE put a gray background on my image?

Your name:

Reply:


Posted by Toby Inkster on 02/05/06 18:55

Alan J. Flavell wrote:
> Toby Inkster wrote:
>
>> And with a little creativity, you could serve up a transparent GIF
>> to any browsers with "MSIE" in their user-agent string, and a PNG to
>> everyone else.
>
> Don't do that - it's bad in principle, and works badly in practice.
> For all the usual reasons.

Pah! I'll agree that detecting browser by user-agent string is generally
rather hit-and-miss, but this is one particular application where
user-agent matching won't cause any problems.

Potential pitfall #1: a non-IE browser has "MSIE" in the user-agent string
and gets sent a GIF instead of a PNG. This isn't a huge problem -- the
only browser that does this by default is Opera, but this will change in
version 9.0. And when a browser does do this, it gets the GIF, which
should still look fairly good -- just not as good as the PNG.

Potential pitfall #2: vice-versa. It is possible, but difficult to change
the u-a string for MSIE. But because it's quite tricky, not many people
will have done it, so not really worth worrying about. Besides which, the
only problem they'll experience in this case will be cosmetic.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация