The NavigatorID.userAgent read-only property returns the user agent string for the current browser.
Browser identification based on detecting the user agent string is
unreliable and is
not recommended, as the user agent string is user configurable.
The User-Agent appears in an HTTP Request Header, not an HTTP Response one. In general, the request is sent from browser to the web application. So the user-agent variable is filled by the browser. Different browsers will fill up this field with different values.
Много обичам да ми носят вода от 10 кладенеца и да ме обвиняват все едно аз съм го създал.

Да, jQuery си е крос платформа на javascript ама нещо заяждането не ти се получи, май ? Друго да добавиш за jQuery ?
По принцип си прав, че няма логика да може да се сменя user-agenta от сървъра/js, но явно може, или поне така твърдят няколко десетки отговора в stackoverflow.
Само един ми покажи. Искам да го видя с очите си, как сървъра сменя юзър-агент и изобщо параметър, който се парсва от браузъра. Не знаеш се пише отделно, за разлика от неграмотен.