The script will sniff for old and dated or generally incapable browsers and see to it that these won't be broken by too complex script or hyper text markup code, but instead that the clients be diverted to an appropriate message on a simplified web page, or relocated to an alternative section of the site, or be given a simpler script code to interpret. Probably you would like to use fresh technologies, but at the same time not lose visitors, just because not everybody updated their browsers or computers in a while. All this can be accomplished seamlessly by the use of client-side JavaScript, and all appropriate functions utilized are highly adjustable with this script. It should preferably be allowed to form part of the site's overall structure, since it's a great utility for redirecting traffic on any site, and for webmasters not being able to use server scripts, it is even more precious.
The script is applying a detection script kept in an external script source file. To learn about that file, read the uaenvirsniff.js manpage.
To let the detection script generate a list of the objects and properties created by functions kept in the file, along with the values found in the currently used browser of yours, go to the demonstration page.
NOSCRIPT
section
A client will enter your site (or a section of it) at an entry point. This is where you should expect any browser to come stumbling in. The page at this primary location in the site's structure should cater for anything. Here's where you utmost need the script, because it sniffs out all relevant features about old and new browsers alike. On this page a part of the script is put, which ought to not break any browser in any way. Very old applications like Netscape Navigator 3 or Internet Explorer 3 would instantly be taken care of and nicely turned away from the site towards the FallBackUponURL, while all other browsers are handled the way you decide.
If the browser is one of the about 5-10% surfing the web without JavaScript available, like
Lynx, ordinary hypertext links (anchors) will substitute for the otherwise automatically
accomplished relocations. Therefore you'd need to prepare the Entry page with a NOSCRIPT
section, as elaborate as you think necessary and appropriate to point the visitor to the hyperlinks. Do you
see a "This is a test NOSCRIPT
message [...]" in the next paragraph? If not, your browser
skipped the contents between the NOSCRIPT
tags, which indicates that your browser is currently
script enabled.
The Entry page being accustomed to all browsers should be kept simple, while the technically advanced stuff being better located at subsections of the site. The script is utilizing methods to deal with the relocation of diverse technologies to specific subsections of the site. By default the script would make ECMAScript (edition 1) compliant browsers make the current location change to another location in a subdirectory (optionally keeping the name of the original file) or simply go on to another file anywhere in the directory structure.
The script is not all about relocation, though. It optionally lets itself be configured to deal with customized script code, and yet let the client remain in the same location. If so, we may call it a "Developer perspective", since you are then actually applying your own scripts to the Sniff and Divide Script structure. A relocation, on the other hand, only intending to go on to MyNextLocatio, not caring about alternative pages, may be seen as a "Personal perspective", fit for personal home pages, while the "Business perspective" cannot afford to do without MyOtherLocation as well.
Before applying the Sniff and Divide Script, you would need to prepare an HTML 3.2 web page for dated technologies. That web page could preferably be one and the same for the whole site, even though the script is applied several times. Here is an example of a fall-back page.
That's it!
© 2001-2008 <larspeemm@netscape.net> · mikaels.net · e-mail
· All rights reserved
The script is FREE to be used but NOT to be traded in. International conventions prescribe that author info
MUST ALWAYS be provided.
Disclaimer: Please, notice that although the script code is believed to work with all current and correctly working JavaScript browsers, it should be applied with care. There is NO WARRANTY of its proper behaviour, and it is offered to the public AS IS, the author refraining from admitting ANY RESPONSIBILITY WHATSOEVER for unexpected results when use is made of it, EVEN IF USED AS INTENDED. The author would REJECT ANY CLAIM for financial or any other loss supposedly because of it.