How can I get details regarding a browser (make, version, platform, etc.) from within a JSP page?

André Wolf

You can retrieve any HTTP header information (including User-Agent) through the request object. The following scriptlet should return browser information:

<%=request.getHeader("User-Agent") %>

For more information consult the API documentation of HTTPServletRequest.

Comment and Contribute






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