Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Web
Expertise: Intermediate
Dec 16, 1999



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Keep Your IIS Browser Definitions Current

Internet Information Server includes a component that helps you determine the capabilities of a browser before you send code that may not be supported. The list of capabilities is stored in a file called browscap.ini on the Web server. If your browser definitions are too old, you may be denying newer browsers the right to see your rich content. You can get the latest update at www.asptracker.com. Here's a sample of an Active Server Pages script that displays some key information.

<%@ Language=VBScript %>
<%Set browsercomponent = Server.CreateObject("MSWC.BrowserType")%>  
Browser is <%= browsercomponent.browser  %> <BR> 
Version is <%= browsercomponent.version  %>  <BR>
Major version is <%= browsercomponent.majorver  %>  <BR>
Minor version is <%= browsercomponent.minorver %>  <BR>
Can handle frames? <%= browsercomponent.frames%> <BR>
Supports tables? <%= browsercomponent.tables%>  <BR>
Okay to send JavaScript? <%=browsercomponent.javascript%> <BR>
Does it do cookies? <%=browsercomponent.cookies%>

When you update your browscap.ini you should stop and restart IIS to get the new version into memory. From the command line, use

net stop iisadmin /y
net start w3svc
Ken Cox
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date