On Fri, 9 Nov 2001, Lex Spoon wrote: > > Bijan Parsia <[EMAIL PROTECTED]> wrote: [snip] > > True, but so? :) Detecting user-agent is something of a hack, but it can > > be a very useful one. Personally, I'd like to have that for use with > > *normal* swikis, though content negotiation is prolly the right way to do > > this. > > In what case would you use this, exactly?
I would use it to send raw swiki text, for example, to Scamper. Or to serve Squeak object based pages to those browsers that understand them. This is why I say "content negotiation is prolly the right...". [snip] > Most of the time people propose a feature like this, they say "I want to > send tag X if it's browser B" or "I want to send text-friendly HTML if > it's browser B". Nope. I want to send stuff altogether different :) I may well want to send *much less*. > Well, HTML already provides for both of these > problems. Browsers are pretty good at just ignoring tags they do not > support. And keep in mind, there are more text-mode browsers than just > lynx, and there are more Squeak browsers than just Scamper. Yes? > Furthermore, your guesses about what someone will desire based on their > browser, have very good chances to be mistaken. It would really bug me, > for example, if someone were to cut the IMG tags out of a page because > they realize I am using lynx. That would be absurd, given alt-attributes. How about *tables* though :) I'm really talking about HTML being the *least* common denominator. > Alternatively, someone might want to layout the page completely > differently depending on the client. However, this is a losing battle > -- new browser versions come out all the time. Not really. Netscape 4.75 and IE 5.5 seem pretty stable choices at the moment. Note: I *totally* agree that using standards based (X)HTML etc. is, generically, a good thing. However, discriminating by user-agent for some purposes can be useful. This hardly seems wildly controversial. > > And it's not *quite* true that you have to modify the sever for new > > browsers...if the browsers forge their user-agent. Abuse, yes, but often a > > useful one ;) > > First, not all browsers do this. I'm surprised. Examples? > Should people really have to > reconfigure their browser to visit your site? Often have to anyway. > Second, this isn't going > to achieve the desired result. If an Opera user visits your site, do > you really want to send them a random choice between Netscape and IE > HTML, depending on what their User-Agent happens to be set to? Well, again, it seems we have *very* different purposes in mind. I'm not talking about munging a bit of HTML to optimize for a certain browser. I'm talking about entirely different functionality. > Now, I will admit that if you are happy with supporting 60-80% of the > people who visit your site, then you can just support the top 3-4 > browser versions in their most common configurations. However, you can > usually support 100% of the people who visit your site if you stick with > standard HTML. "Standard" being the big issue. If you support MS browsers, standards are hard to support. Vice versa. :) User-agent discrimination is a hack, often a useful one, especially for experimental stuff and often when you control both the server and the client. As we do with ComSwiki + Scamper. There are other ways to achieve the kinds of effects I'm talking about, of course, and often they should be prefered. Not always. Cheers, Bijan Parsia.
