API review request: adding WebEngine.userAgent
Peter Zhelezniakov
Peter.Zhelezniakov at oracle.com
Thu May 31 08:47:58 PDT 2012
Hello,
I suggest adding a new 'userAgent' property to WebEngine. This was
requested several times by developers. Some sites serve different HTML
depending on the user-agent string, so applications may need to pretend
they are Chrome or Safari or whatever.
The JIRA issue is http://javafx-jira.kenai.com/browse/RT-19262
/**
* User agent string. This string is the value of the {@code User-Agent}
* HTTP header and is included in all HTTP requests issued by this
* {@code WebEngine} object. Some servers may use it to identify the
type
* of the client, and behave differently depending on this setting.
*
* If the value is {@code null}, some default value is used which is
* operating system dependent.
*
* @defaultValue null
*/
public final void setUserAgent(String value);
public final String getUserAgent();
public final StringProperty userAgentProperty();
Thanks!
--
Peter
More information about the openjfx-dev
mailing list