Log user browser details in Node.js
Is there a way to log which browser/OS/etc. the user is using from my Node.js app?
开发者_JAVA百科Thanks
I believe you want the information stored in the Request Header "User-Agent"
var useragent = request.headers['User-Agent']
My user-agent is: "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.220 Safari/535.1" for chrome
精彩评论