[thelist] ASP browsercheck code for XML-enabled browser?

Scott Dexter sgd at ti3.com
Wed Apr 5 13:25:08 2000


Hi Bert, 

first a little background on the MSWC.BrowserType object, then maybe an
answer (or at least some food for thought)

the MSWC.BrowserType object is a fun way MS lets you use server side code to
detect browser capabilities. What the object does is take the http
USER_AGENT string that the browser sends and looks it up in a static file
(browscap.ini) and makes its decision.

You, as the IIS administrator, have to make sure your browscap.ini is up to
date. In using this object you are relying on two Very Bad Thing(tm)s:

1) using the browser version to determine functionality
2) relying on MS to have it 100% correct all the time, for every browser
ever made

that being said, get the most up to date browscap.ini
(http://www.microsoft.com/ISN/faq/latest_browscapini_file.asp) and see if
there's something you can get out of it

sgd
--
think safely

> -----Original Message-----
> From: Bert Szoghy [mailto:BertS@Escom.ca]

> The following ASP VBScript will tell you if the browser is 
> Java enabled:
> 
> 
> <% Response.Buffer = True %>
> <% Set objBrowse = Server.CreateObject("MSWC.BrowserType")%>
> <% If objBrowse.javaapplets = true then %>
> 	<!-- #INCLUDE FILE="../lib/Header_With_Java.asp" -->
> <% Else %>
> 	<!-- #INCLUDE FILE="../lib/Non_Java_Header.asp" -->
> <% End If %>
> 
> 
> You can substitute "javaapplets" with "javascript" to find out if the
> browser has javascript enabled.
> 
> My question is, is there a quick and easy way to find out if 
> the browser is
> XML-enabled?
>