How to determine the client browser version? Also, how to check if it allows cookies?

Ramakrishna puppala

Another name for "browser" is "user agent." You can read the User-Agent header using request.getUserAgent() or request.getHeader("User-Agent")

See this question in the JSP FAQ: http://www.jguru.com/jguru/faq/view.jsp?EID=12253 for a class which embodies lots of good info about the browser.

It's not enough to tell if the browser might possibly support cookies; you also must tell if the user has enabled or disabled cookies. For that, you must drop a test cookie on the browser, then see if it gets sent back. A servlet that does this is called CookieDetector, at http://www.purpletech.com/code/.

[Keywords: identify client browser, determine client browser, check version of client browser]
0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


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

 

 

About | Sitemap | Contact