http://www.boredofstudies.org/sniffer.js - a piece of JavaScript code that belongs in the last millenium.
Its role is to work out which web browser you are using, and to display the menus on the Bored of Studies web site accordingly. As it is, I get no main menu, and BoS provides no other way to access its resources.
First I will deal with the problems with sniffing. Then problems with the web site that relate:
Sniffing
The aim of sniffing is to find out what features in Javascript a particular browser has. One can do this by asking the browser to tell you its name, and you judge it because you know it, but you must know what to do if you have never heard of the browser (see below)!
This means that if someone were to release a browser BoS had never heard of, like Safari appeared two years ago, it wouldn't know how to handle it, even though the browser may be fully capable if only BoS treated it like any other. Additionally, if the sniffer includes checking for different versions of a browser, as BoS's does, when a new version comes out (or some new Betas), the sniffer won't be able to handle it. This is the case with Opera 8.
A much better way to do it is by testing to see if the browser is capable of doing the things that your script needs. And this is simple with javascript.
No alternative
Because BoS uses exclusive, name-based sniffing, when it finds a browser it does not know, it will simply not give it a menu. The menu should not be constructed by Javascript, but should be made up of links in the actual pages. This means that users with other browsers, or users that like to browse with Javascript off, can still use the BoS site.
It would also help people with impairments, such as those that would require the page to be heard, rather than seen (visual impairment). Things directly in the text of the page are much easier to use here.
Basically, the BoS web site has poor design for accessibility, and I have said it before. [while hscstuff, BoS's predecessor, was much less visually appealing, at least everyone could access it.]
With all my love,
- Joel
Its role is to work out which web browser you are using, and to display the menus on the Bored of Studies web site accordingly. As it is, I get no main menu, and BoS provides no other way to access its resources.
First I will deal with the problems with sniffing. Then problems with the web site that relate:
Sniffing
The aim of sniffing is to find out what features in Javascript a particular browser has. One can do this by asking the browser to tell you its name, and you judge it because you know it, but you must know what to do if you have never heard of the browser (see below)!
This means that if someone were to release a browser BoS had never heard of, like Safari appeared two years ago, it wouldn't know how to handle it, even though the browser may be fully capable if only BoS treated it like any other. Additionally, if the sniffer includes checking for different versions of a browser, as BoS's does, when a new version comes out (or some new Betas), the sniffer won't be able to handle it. This is the case with Opera 8.
A much better way to do it is by testing to see if the browser is capable of doing the things that your script needs. And this is simple with javascript.
No alternative
Because BoS uses exclusive, name-based sniffing, when it finds a browser it does not know, it will simply not give it a menu. The menu should not be constructed by Javascript, but should be made up of links in the actual pages. This means that users with other browsers, or users that like to browse with Javascript off, can still use the BoS site.
It would also help people with impairments, such as those that would require the page to be heard, rather than seen (visual impairment). Things directly in the text of the page are much easier to use here.
Basically, the BoS web site has poor design for accessibility, and I have said it before. [while hscstuff, BoS's predecessor, was much less visually appealing, at least everyone could access it.]
With all my love,
- Joel