Browser Capabilities Project
Providing regularly updated browscap.ini and related downloads since 1998!
Microsoft had a good idea when they created browscap.dll and browscap.ini to use with their web server for browser identification.
In theory, someone at Microsoft would routinely update the browscap.ini file and make it available to its customers. As a result we would all have reliable and accurate browser identification in order to know exactly what features the client's browser supports.
Sadly, Microsoft never made any attempt to keep the file up to date.
Here is what we do as part of the project.
Shortly after midnight on Sunday morning the website log files for this site and over thirty other sites of various types are downloaded. Once downloaded, the log files are analyzed on a number of levels. Over the years a number of solutions for automatically collecting the data needed for further analysis have been developed in-house. The vast majority of new user agents seen each week are variations on existing user agents in one of our databases, so when the analysis is complete there are usually around two dozen truly new and unique user agents to investigate. Only a few new user agents from major search engines and popular browsers are eventually added to the files in any given week.
User agent detection is still a long ways away from being 100% accurate though because there will always be new user agents that aren't in the files yet and hence won't be properly identified. There are also the bugs in both browscap.dll and PHP's get_browser() -- which the files also support, to contend with. And of course there are always spoofed user agents. User agents that claim to be one thing, but in fact are often badly behaved bots masquerading as well behaved bots like Googlebot.
Approximately once a week the raw data in our database is compiled into various reports, including the all-important browscap.ini file for browser identification, and gets uploaded to this website.
The files are freely available for download so long as you abide by our Terms of Use.
Backward compatibility with the classic browscap.ini format has been preserved.
Although targeted for Microsoft's web servers; IIS 5 and later, PHP can use the files as its data source in the get_browser() function. We are PHP's officially recommended source for that file. Due to the way PHP's get_browser() parses .ini files you will need to use our special version of browscap.ini for PHP called php_browscap.ini.
Drupal users can incorporate the Browscap module to identify user agents. We provide an uncompressed CSV file to accommodate Drupal.
The downloads page has links to several sites that offer PHP classes which do not depend on the native get_browser() function, or PHP's flaky .ini parser, or the special version of the files for accurate results. These classes have the added benefit of letting you define where the browscap.ini file should go, which is perfect for shared hosting environments where the host does not maintain an updated browscap.ini file for you.
While Microsoft has abandoned browscap.ini as a means of browser detection in favor of more sophisticated and accurate methods, there are a growing number of people who rely upon browscap.ini for all sorts of purposes. With the data from our database being available in so many different formats, it's easy to use it in any situation where accurate user agent detection is important.
Hopefully the project has a long and bright future ahead of it to compliment its already long history of service to the web development community since 1998.
| Gary J. Keith and Browser Capabilities Project © 2012 |