yegor256
yegor256

Reputation: 105043

How to detect web browser name and version?

Looking for a Java library that converts User-Agent header into browser name and version.

I need this information in order to understand whether I can send XML+XSL to the browser, or I should do the transformation to XHTML on the server.

Upvotes: 2

Views: 1891

Answers (1)

Andrew Thompson
Andrew Thompson

Reputation: 168815

I need this information in order to understand whether I can send XML+XSL to the browser, or I should do the transformation to XHTML on the server.

It seems the best approach for that is content negotiation. When you run a restaurant (server), don't ask the diner (UA) what their name is, just ask them what they want to eat (content type)!

Upvotes: 1

Related Questions