Friday, 15 March 2013

Does the request object in Node.js contain any navigator.userAgent type of information? -



Does the request object in Node.js contain any navigator.userAgent type of information? -

i've setup node.js server gets contact form info , forwards email. i'd able forwards info user's browser along form data.

is of info contained in request object in form ? kind of navigator.useragent string available on client ?

or should include string in info sent out, manually, myself?

i thinking of :

var httpserver = http.createserver(function (request, response) { var browserid = request.navigator.useragent; });

thanks!

i testing out myself in express, , can find user-agent string in:

request.header['user-agent']

and can see in http specification in 14.43 here.

in future, can examine request object either console.log() or debugger , see what's in it. find more educational trying find things in documentation somewhere.

node.js request navigator

No comments:

Post a Comment