[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-openjfx-dev
Subject:    API review request: adding WebEngine.userAgent
From:       Peter.Zhelezniakov () oracle ! com (Peter Zhelezniakov)
Date:       2012-05-31 15:47:58
Message-ID: 4FC792AE.6040704 () oracle ! com
[Download RAW message or body]

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic