Details
Description
I did a tiny change at the QT DemoBrowser example and added a line to change the useragent at webview constructor.
this->page()->profile()->setHttpUserAgent("Test");
If i execute the js code
navigator.userAgent
on the console at all tabs i get the result "Test".
If i execute the js code
window.open("https://www.w3schools.com", "_blank", "toolbar=yes,scrollbars=yes,resizable=yes,top=500,left=500,width=400,height=400");
on the console at e.g. the first tab i get a new window.
If i execute the js code
navigator.userAgent
on the new window i get
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.9.1 Chrome/56.0.2924.122 Safari/537.36"
I expected "Test". If you have a different Qt WebEngine Browser running it can also take there useragents
Attachments
Issue Links
- duplicates
-
QTBUG-61174 Clicking on a link that opens with a _blank target will cause it to not pick up a customized user agent string
- Closed