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

aardvark roselli at earthlink.net
Wed Apr 5 14:28:58 2000


> From: Bert Szoghy <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 %>

actually, since this relies on the browscap.ini file, this won't always 
work... some browsers (like Mozilla builds, WebTV, some versions 
of Navigator, etc) will come up as 'Default'...  if you aren't always 
updating that .ini file, the info it provides is useless... in fact, you 
might want to rely on the User Agent string sent in the HTTP 
header and track ones you know...

also, it won't tell you if that Java has been disabled once you find 
it...

however... read on...

> My question is, is there a quick and easy way to find out if the
> browser is XML-enabled?

server-side in IIS?  try using BrowserHawk from 
http://www.cyscape.com/ ... they track XML capability... hit their 
demo page to see what i mean, it will tell you if your browser is 
XML-capable...