|
Posted by Gιrard Talbot on 10/24/06 06:31
Jukka K. Korpela wrote :
> Scripsit GΓ©rard Talbot:
>
>> jaydev wrote :
>>> Hi,
>>>
>>> I am looking for code to detect and redirect to the corresponding
>>> browser download page if the clients uses old version, could anyone
>>> have a sample code for this?
>>
>> Hello jaydev,
>>
>> You have an interesting and worthy post in there. It's definitely a
>> good question.
>
> Well, it might be a good _question_. The correct _answer_, though, is
> that such efforts are a waste of everyone's time, and worse.
>
It all depends actually on what is the whole webpage context, situation
(purpose served for browser detection), not just how detection is done -
that is if it can be done reliably - but also *_how_* people are invited
to upgrade. A simple clickable-reactive <browse happy image> might be
good enough, you know.
> The page author would just upset and throw out some part of potential
> users. If he somehow managed to make someone update his browser, this
> would still distract from the site's own content.
>
Any link involving a download would do that too. E.g.:
<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
codebase=
"http://java.sun.com/products/plugin/autodl/jinstall-1_5_0-windows-i586.cab#Version=1,5,0,9"
codetype="application/java" standby="Loading of applet in progress..."
height="200" width="350"> (...)
will involve an auto-download of 16.2MB download for anyone not using
JRE 1.5.0_b9.
> Besides, the detection is bound to fail, and the redirects are bound to
> take users to wrong pages.
Of course, that's possible and it's the danger. That's why it will
always be best to create real link in a webpage where people can choose
a browser (download) by themselves and not via javascript, which as you
rightly point out, is not 100% full-proof.
> Maybe not immediately, but next month or next
> year. If you can make me believe that authors who write browser-sniffing
> and browser-redirection code will actually _maintain_ the monstrosity
> they create, you might just as well try making me believe in elves,
> Santa Claus, the Great Pumpkin, and even politicians' promises before
> elections.
Very often, they don't maintain the monstruosity they create ... or copy
from others' sites.
Jukka, just visit my own website http://www.gtalbot.org/ and you'll see
that all links at the bottom of the webpages can not mislead or
misredirect visitors.
I do use some kind of browser detection in a few of my DHTML section
webpages and it happened once, after a browser upgrade (involving
Opera), that it no longer worked, and so, I had to update the whole
thing, tune again.
If you include the following in a webpage
<!--[if gte IE 4]>
<p>You're using Internet Explorer which is known to be prone to
spywares, to have unpatched security weaknesses and to make computers
unsafe. For best security and better usability, please consider
switching to a better browser. You may visit <a
href="http://browsehappy.com/"><img
src="http://browsehappy.com/buttons/bh_185x75.gif" width="185"
height="75 alt="Browse Happy" style="vertical-align: bottom;"></a> for
explanations and assistance.</p>
<![endif]-->
it will work accordingly, as expected for IE users and it should still
work for many years.
GΓ©rard
--
remove blah to email me
[Back to original message]
|