Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


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

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 %>
<HTML>
<HEAD>
</HEAD>
<BODY>
<%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%>
</BODY>
</HTML>

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.

 

 

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