The future of browscap

436 views
Skip to first unread message

John Babak

unread,
Jul 8, 2012, 4:13:50 AM7/8/12
to brow...@googlegroups.com
Creating this thread to continue the discussion started at Github https://github.com/GaryKeith/browscap/issues/20#issuecomment-6827124

GaryK

unread,
Jul 9, 2012, 2:22:32 PM7/9/12
to brow...@googlegroups.com
Everyone: The discussion was about the future of browscap and possibly devising a new framework that would make greater use of regular expressions to reduce the size of the files while providing even more data about each user agent than is possible now.

John: Did you have some ideas on how this could be accomplished?

John Babak

unread,
Jul 9, 2012, 3:37:42 PM7/9/12
to brow...@googlegroups.com
On Sunday, July 8, 2012 12:13:50 PM UTC+4, John Babak wrote:
> Creating this thread to continue the discussion started at Github https://github.com/GaryKeith/browscap/issues/20#issuecomment-6827124

The user-agent-string.info project ( http://user-agent-string.info/ ) has more compact and optimized database with regular expression support. It detects less features but has capability to detect more browsers and OS. Though I've found some incorrect detections with publicly available user-agent strings (e.g. Nokia Browser), it looks promising.

Some work towards the browscap.ini replacement has been done by Microsoft: http://msdn.microsoft.com/en-us/library/ms228122.aspx - they introduced XML-file with regex and variables support to parse user-agent strings. There is a project that is somehow related to that: http://owenbrady.net/browsercaps/ ; the site has some examples in this format: http://owenbrady.net/browsercaps/OceanAppleWebKit.V4.browser.xml


On Sunday, July 8, 2012 12:13:50 PM UTC+4, John Babak wrote:
> Creating this thread to continue the discussion started at Github https://github.com/GaryKeith/browscap/issues/20#issuecomment-6827124

GaryK

unread,
Jul 10, 2012, 12:34:16 AM7/10/12
to brow...@googlegroups.com
We mentioned Owen's project in the issue you opened on GitHub. He doesn't seem to have updated it in several years though. Plus it doesn't work in Classic ASP, only .NET. But it might make a nice start to a database for some new system of parsing the files. Is that something you'd be interested in?


John Babak

unread,
Jul 10, 2012, 1:35:00 AM7/10/12
to brow...@googlegroups.com
On Sunday, July 8, 2012 12:13:50 PM UTC+4, John Babak wrote:
> Creating this thread to continue the discussion started at Github https://github.com/GaryKeith/browscap/issues/20#issuecomment-6827124

Have you got access to Owen's database generator? Current version of your browscap.ini could be translated into his structure with some script. No problem with Classic ASP: it will use browscap.ini if the automatic translation is done. And I'm not aware about the usage stats of Classic ASP, is it really so popular today and will it be in the nearest future?

I'd also be interested in user-agent-string.info structure and database, because it seems more opimized by filesize (XML by itself is a heavier structure than related key-value pairs). It has parsers written for most modern server-side technologies. Maybe contact with the author to collaborate on synchronizing the databases and tests?

GaryK

unread,
Jul 10, 2012, 4:57:24 PM7/10/12
to brow...@googlegroups.com
Have you got access to Owen's database generator?

Not directly, but we're sure he'd do it if we asked him to.


And I'm not aware about the usage stats of Classic ASP, is it really so popular today and will it be in the nearest future?

It's still popular but not like it used to be. The php_browscap.ini file has been downloaded 20,131 times this week while browscap.ini has only been downloaded 8,881. Still, we are and always have been committed to maintaining compatibility with Classic ASP using Microsoft's browscap.dll as our benchmark when testing the patterns. Anything we might collaborate on would have to be in addition to browscap.ini.


I'd also be interested in user-agent-string.info structure and database, because it seems more opimized by filesize

We'll take a look at it later and maybe contact the author.





Krinkle

unread,
Oct 31, 2012, 1:48:20 PM10/31/12
to brow...@googlegroups.com
On Sunday, July 8, 2012 10:13:50 AM UTC+2, John Babak wrote:
> Creating this thread to continue the discussion started at Github https://github.com/GaryKeith/browscap/issues/20#issuecomment-6827124

One promising initiative I found was ua-parser (based on earlier work by Steven Souders). It has a pretty efficient format and future proof by not hardcoding each and every version (e.g. not just Opera 11.1 and 11.5 but 11.2-4 would be detected as well instead of falling back to 11.0), as well as future releases the day they come out. So for example unless Google Chrome changes their user-agent pattern (in which case the new pattern will be added in the correct order) Chrome 40, Chrome 60 etc. will all be detected without any work.

More info: https://github.com/tobie/ua-parser

Perhaps our communities can combine efforts? Both seem fairly popular. Browscap has the upperhand in PHP-land (likely due to native support from inside php.ini), but outside PHP it seems ua-parser is one of the more popular frameworks.

-- Krinkle

GaryK

unread,
Oct 31, 2012, 4:45:44 PM10/31/12
to brow...@googlegroups.com
If you want to take the lead on that please do so. I'm tired and just want to end this thing so I'll be closing it in the next few days instead of at year's end. Once it's closed I'll zip all my scripts and source code and put them here on Github.
Reply all
Reply to author
Forward
0 new messages