I have a strange behaviour with an application. Some content will be shown correctly on Internet Explorer but will not be displayed at all on Chrome. Reproducing the error on another client is not possible (it works on both) and also I cannot test it on the client that has the problem, because it is in production and I do not have access. The only way is to check first the logs and see what is going on. The plan is to see both requests that load the content from the server, with IE and with Chrome and try maybe to find any difference.
In the logs I see something like:
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36
I don't understand how it can be possible in the User-Agent
in header of the HTTP request to be included three different browsers?! How do I know from which browser was made the request?
This is a "pretend to be someone else " behaviour in browser world. Many browsers (if not all) adopted this strategy, for practical reason. There are a lot of articles describing this issue, e.g. user-agent-string-history
For the example in question: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36
, it is Chrome 73 on Windows.
For OP's question in the comment:
Why does a browser behaves like that?
-- Because many website/webpage will sniff which browser is visiting the page, and only deliver some features if the browser is IE/Mozilla/... (BAD programming practice, but...anyway, it happens, especially in the old days of Internet). In that case, if a new browser is released and want to show user the same feature for that page, it has to be pretend as IE/Mozilla/...
Does it means that I cannot find the information I need from this logs?
You can. But you need to match the User-Agent
precisely with User-Agent database, there are more than 2,100,000 User-Agent string... Please check https://developers.whatismybrowser.com/useragents/explore/software_type_specific/web-browser/2
And why do I see sometimes only one entry in the User-Agent header property?
Because some user-agent decide not to pretend it's someone else. A typical example is command line HTTP client such as curl, which doesn't need to handle browser sniff.