Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Compatibility problem with Myspace and SWT Browser(Unsupported browser message)
Compatibility problem with Myspace and SWT Browser [message #743401] Fri, 21 October 2011 08:41 Go to next message
Francois Missing name is currently offline Francois Missing name
Messages: 15
Registered: October 2011
Junior Member
Hello,

I've developped an application based on the SWT browser widget which help Myspace browsing. Since 1 or 2 week, Myspace send me automatically to the "unsupported browser" page as if I was using an old version of Internet Explorer.

But I'm using SWT 3.7 and I've IE9 installed on my workstations.

I've build html test pages which see my browser as IE9.
I don't have the problem if I set the browser to Webkit, I don't have the problem.

Any clue why Myspace is not recognising SWT browser as IE9 ?

Thanks !

François from MMM
Re: Compatibility problem with Myspace and SWT Browser [message #743781 is a reply to message #743401] Fri, 21 October 2011 14:29 Go to previous messageGo to next message
Grant Gayed is currently offline Grant Gayed
Messages: 2148
Registered: July 2009
Senior Member
Hi,

It sounds like this should work fine. Have a look at
http://www.eclipse.org/swt/faq.php#browsernativeie , does this give you
any ideas? If not, it could be a Browser bug. Try the following:

- run regedit, go to HKEY_CURRENT_USER\Software\Microsoft\Internet
Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION
- run your app, show a Browser control in it
- refresh the registry (F5)
-> did an value get added to the above registry location whose name
matches your launched process (probably javaw.exe)? Unfortunately this
registry location is the only way that an IE embedder can influence the
IE version that gets embedded, otherwise it's capped at IE7 emulation mode

Grant


On 10/21/2011 8:41 AM, Fran wrote:
> Hello,
>
> I've developped an application based on the SWT browser widget which
> help Myspace browsing. Since 1 or 2 week, Myspace send me automatically
> to the "unsupported browser" page as if I was using an old version of
> Internet Explorer.
>
> But I'm using SWT 3.7 and I've IE9 installed on my workstations.
>
> I've build html test pages which see my browser as IE9. I don't have the
> problem if I set the browser to Webkit, I don't have the problem.
>
> Any clue why Myspace is not recognising SWT browser as IE9 ?
>
> Thanks !
>
> François from MMM
Re: Compatibility problem with Myspace and SWT Browser [message #748364 is a reply to message #743781] Mon, 24 October 2011 13:03 Go to previous messageGo to next message
Francois Missing name is currently offline Francois Missing name
Messages: 15
Registered: October 2011
Junior Member
Hello,

You're right ! I've looked at the regedit entry and it is set to 9000. If I set it to 9999 then the Myspace unsupported browser page does not appear anymore !

Problem now is : as I distribute this app, how to be sure the regedit is set up to 9999 and not 9000 ?

François
Re: Compatibility problem with Myspace and SWT Browser [message #748616 is a reply to message #748364] Mon, 24 October 2011 15:54 Go to previous messageGo to next message
Grant Gayed is currently offline Grant Gayed
Messages: 2148
Registered: July 2009
Senior Member
Interesting, I would have thought that a value of 9000 would be fine,
but I guess it is doing the browser detection on a page without the
appropriate !DOCTYPE directives. This could probably be considered a
bug in the Browser, since its intent is to always make the installed IE
version fully available. I've logged
https://bugs.eclipse.org/bugs/show_bug.cgi?id=361861 to investigate this
further.

Regarding workarounds, this value (9999) can be specified by setting the
org.eclipse.swt.browser.IEVersion java property as described in the FAQ
link. However this is something that is usually done by the end user,
not by the app. Assuming that an app wants to support any IE version
that happens to be installed, the only way I can think of to do this
would look like:

1. Create a BrowserInitializer implementation, as described in the final
paragraph of http://www.eclipse.org/swt/faq.php#browserspecifydefault .
It will be invoked when the first Browser instance is about to be created.

2. In your BrowserInitializer, duplicate the code block beginning at
http://git.eclipse.org/c/platform/eclipse.platform.swt.git/tree/bundles/org.eclipse.swt/Eclipse%20SWT%20Browser/win32/org/eclipse/swt/browser/IE.java?id=v3808#n195
in order to determine the installed IE version without creating an
instance of one.

3. Assuming that this value is >= 8, set the
org.eclipse.swt.browser.IEVersion java property to it * 1111 (I don't
know for sure how this version numbering scheme will progress once IE10
is released).

Sorry that this is rather ugly, but I can't think of another way to do
this without requiring your end user to set this value. I think it
should work, unless there are method visibility problems (?).

Grant


On 10/24/2011 1:03 PM, Fran wrote:
> Hello,
>
> You're right ! I've looked at the regedit entry and it is set to 9000.
> If I set it to 9999 then the Myspace unsupported browser page does not
> appear anymore !
>
> Problem now is : as I distribute this app, how to be sure the regedit is
> set up to 9999 and not 9000 ?
>
> François
Re: Compatibility problem with Myspace and SWT Browser [message #748804 is a reply to message #748616] Mon, 24 October 2011 18:42 Go to previous message
Francois Missing name is currently offline Francois Missing name
Messages: 15
Registered: October 2011
Junior Member
Hello,

Running java with -Dorg.eclipse.swt.browser.IEVersion=9999 seems to solve my problem. Thanks !
Previous Topic:drag and drop effects
Next Topic:Display not updating while application menu is open
Goto Forum:
  


Current Time: Fri Jul 25 07:33:49 EDT 2014

Powered by FUDForum. Page generated in 0.01860 seconds