As is written in Node.JS API documentation, the req
paramenter is used to access headers, data and response status(see HTTP response codes).
Inspecting the req
object for each browser is too hard because of the number of properties and methods(a lot of discussion here). But if you would inspect the headers(req.headers
) you would see a small difference between req
objects. For example I opened a new Google Chrome Icognito Window and a new Private Windows in Firefox and these the headers:
{ host: 'lvh.me:8000',
'user-agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0',
accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'accept-language': 'en-US,en;q=0.5',
'accept-encoding': 'gzip, deflate',
connection: 'keep-alive' }
{ host: 'lvh.me:8000',
connection: 'keep-alive',
accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36',
'accept-encoding': 'gzip,deflate,sdch',
'accept-language': 'en-US,en;q=0.8' }
So, the only properties that are same in both objects are host
and connection
. But the host could be different if you call the server with a different subdomain(For example: www
)
If you could inspect the whole object, probably you would find out more about each browser.