![]() | |
![]() |
| | Thread Tools | Display Modes |
#21
| |||||||||||||||||||||
| |||||||||||||||||||||
|
|
You could try to explain why you "do not need to read the FAQ". Sure. For the same reason I do not need to read the bible in order to be a good Christian. |
|
I suppose one can find many similar ways to explain what you asked. |
|
I'll tell you the truth tho. I have read the FAQ about 2 years back. Since then so much has happened that I do not even remember what was in there and what not. |
|
Isn't it still a fact that most script that goes around is not cross-browser? Yes, it is also a fact that some scripts do not even manage to be multi-browser (which is all that your scripting actually aspires to be, judging by your other posts in this thread). Well, the scripts that I have posted are certainly multi-browser so what you say here is obviously wrong. |
|
I have also heard that no scripter really knows what he/she is doing. What do you think about that? If you did hear that it will have been from the lips of someone who did not know what they were doing and was looking to justify their unwillingness to find out. You sound hurt. |
|
Why don't you tell us what else you do well except scripting |
|
(if we assume that you even do that well). |
|
Maybe you can prove that you don't have any ego-related reason in making this claim. |
|
Have you ever wondered why the user agent string is there at all? Why was it introduced and kept in countless versions and builds? |
|
I quote from RFC 2616: ---- 14.43 User-Agent The User-Agent request-header field contains information about the user agent originating the request. This is for statistical purposes, the tracing of protocol violations, and automated recognition of user agents for the sake of tailoring responses to avoid particular user agent limitations. User agents SHOULD include this field with requests. The field can contain multiple product tokens (section 3.8) and comments identifying the agent and any subproducts which form a significant part of the user agent. By convention, the product tokens are listed in order of their significance for identifying the application. User-Agent = "User-Agent" ":" 1*( product | comment ) Example: User-Agent: CERN-LineMode/2.15 libwww/2.17b3 ---- After all the computer world only revolves because there are standards that are followed by majorities. |
|
The status of things is that the navigator.userAgent string is no longer a discriminating identifier of web browsers and, if it ever was, it never will be again. The point is that it should be. |
|
On the other hand perhaps your faith that object/property testing will remain a good way to test is overly inflated. |
|
Web browsers are user configurable software. ... snip You are not supposed to fake user agent strings. Period. |
|
This feature has only become available in various browsers and only because it is very easily implementable. |
|
Of course your "browser detecting" followed by the assumption that everything is then going to be the way that you are expecting it is going to fall down with many non-default configurations even on IE. What percentage do you think? I say it works 99%. |
|
(assuming of course that these browsers that are indistinguishable from IE are actually minority browsers. It is impossible to tell if they always appear in the browser statistics as IE). Heh, sorry but this reminds me of comical Ali. |
|
1. Detecting a browser type is not necessarily for scripting purposes. For instance, you may not like the way something renders in gecko. Rendering is presentation, so CSS. Use CSS solutions for CSS problems, ... Yeah but CSS does not always work the way one wants and the detection is done in JS not CSS. |
|
You are still thinking in terms of browser detecting. Feature detecting is an integral part of scripting; there is no distinct "detector" at all. wow, that is tew kewl (and deep). |
|
A few points to keep you busy: * Should every browser preferably have a distinctive user agent string or not? Don't read the RFC just use your common sense. |
|
* You are trying to make a rule out of the exception (exception being the faked strings) |
|
* I can write a user agent that fakes the existence of certain JS objects but provides others while for the faked ones has Shakespeare quotes as the return value of various methods. I could name this product Fudgilla (create say 10 variants of it under different names like Geekzilla), make it freely available to the geek crowds and then argue that because these products exist the feature detection method is no good anymore for deciding what kind of browser we got. snip |
#22
| |||
| |||
|
|
Sure. For the same reason I do not need to read the bible in order to be a good Christian. Judging by your posts to microsoft.public.scripting.jscript under this subject you are not a good Christian so perhaps you should RTFM. |
#23
| |||
| |||
|
|
His last post being the one to me that convinced me he was under the false impression he possesses some intelligence. Randy, tell us (please?) what is wrong with this: "...being the one to me that convinced me...". You don't even listen to your teacher you naughty boy you. |
#24
| |||
| |||
|
|
But, if browser detection is the way to go, as you claim, could you _please_ show me how to do this simpler? Using Browser Detection: if (document.images){ //lets work with images } |
#25
| |||
| |||
|
|
His last post being the one to me that convinced me he was under the false impression he possesses some intelligence. |
|
My hats off to you Richard, you have argued your point (successfully) with the moron way longer than I ever would have. |
#26
| |||
| |||
|
|
I would say "let's work with document.images". I often see people writing if (document.images) { var img1 = new Image(); img1.src = "foo.png"; ... } Statistically, it appears that there is a strong correlation between document.images and window.Image (both introduced in Netscape 3 and both exists in all later browsers), but it is not object detection. |
#27
| |||
| |||
|
|
In article <pthqn87a.fsf (AT) hotpop (DOT) com>, Lasse Reichstein Nielsen <lrn (AT) hotpop (DOT) com writes: Statistically, it appears that there is a strong correlation between document.images and window.Image (both introduced in Netscape 3 and both exists in all later browsers), but it is not object detection. Its not browser detection either though. |

|
But another example can be: if (document.getElementById){ //lets use document.getElementById } |
|
Not wanting to get into the testing argument again, but neither of these is browser detection, nor do I need to know the browser. Its irrelevant, no? |
#28
| |||
| |||
|
|
But, if browser detection is the way to go, as you claim, could you _please_ show me how to do this simpler? Using Browser Detection: if (document.images){ //lets work with images } Your move stupid. |

#29
| |||
| |||
|
|
Absolutely. I advocate object detection too, but all object detection will eventually assume something about the detected objects. Finding a property called "getElementById", or even a function by that name, doesn't tell us what it does. We have to assume that the browser manufacturer isn't being stupid or deliberatly malicious. But I prefer trusting the behavior of a feature to trusting its existence. |
#30
| |||
| |||
|
|
Haven't you yet learned the futility of trying to have a debate with the mentally challenged? ![]() Don't have a battle of wits with an unarmed opponent. It isn't nice. Or are you just playing with him because you're bored? *LOL* |
![]() |
| Thread Tools | |
| Display Modes | |
| |