You are not logged in. Login or Signup
Home » Messageboard » XXX » Message 3777468 (Thread)

#
I know!

use if (stristr($HTTP_USER_AGENT, 'MSIE')) { echo '<img src='\' />'; } else { echo '<img src='\' />'; }

(Probably managed to add an error somewhere, as I'm thick, but thats the jist of it. And I can't be bothered to fix the image codes. Oh well.)
(, Sat 2 Oct 2004, 14:12, archived)
# *tries*


It works! Horay! (Well, no errors yet)
(, Sat 2 Oct 2004, 14:14, archived)
# that'll catch a default opera config as well
(so at least throw away anything that contains "Opera")

hate to say it, but server-side browser-sniffing is a horribly-flawed idea.

EDIT: also, when the overwhelming market-share is held by (in this case) the lowest common denominator (IE), you really want to be doing it the other way around - serve the gif by default, and the png only to certain select browsers.
(, Sat 2 Oct 2004, 14:19, archived)
# But IE is the only one that doesn't allow png transparency isn't it?
(, Sat 2 Oct 2004, 14:24, archived)
# pretty much,
my way was just safest (and supports random older browsers like NN4)

found another oddball for you -- IE/mac apparently supports 8-bit alpha-channels without hackery.
(, Sat 2 Oct 2004, 14:38, archived)
# really?
so it's just crappy ol' microsoft then, eh?
(, Sat 2 Oct 2004, 14:42, archived)