How to change the UserAgent of a window opened with window.open(), if possible?

Viewed 43

It doesn't appear this is possible, looking at the Mozilla docs, but I came upon this answer which doesn't make sense to me. The reason I want to do this is that I want to trick Bing into thinking it is being accessed by a mobile device/browser.

1 Answers

You can't modify the UserAgent property using JavaScript.

From Mozilla Docs

The Navigator.userAgent read-only property returns the user agent string for the current browser.

It is possible to change the User-Agent header for a XHR request but it doesn't work for the Chrome browser.

Related