HTMLViewer under Win10 - perhaps not a subclassing issue after all

I’ve been doing some testing in both Win7 and Win10 VMs, trying to run a big chunk of obscurely written javascript in a an HTMLViewer. When I first tried this in Win7, there were a couple of javascript errors; then I can across the doc on the HTMLviewer page that suggested updating to IE11 and more particularly asking (by making some registry entries) that one’s app be given the IE11 renderer instead of the default. No more JS errors after that.

I repeated the exercise under Win10, and to my chagrin the same errors were back again. After some amount of fiddling around in the IE11 debugger, I noticed that it seemed to default to rendering as IE7, and the debugger even gave a message saying that this was because the Compatibility Setting “Display intranet sites in Compatibility View” was set. After I turned this off, all was well - again, no more JS errors. So IE configuration settings affect how the renderer works, and a local file loaded with LoadPage is counted as such a “site”.

This setting appears to exist because larger MS customers with intranets where they run old unmaintained websites need to have IE11 run in quirks mode.

Is there any way to affect IE11 settings from within a Xojo app?

Oh you’re pulling the content from a local folder? That changes a lot re: our last conversation as the browser will be under a totally different security model :frowning:

Try putting this right at the top of , it will attempt to force the browser into the version 11 which should bypass the Compatibility View setting.

If that doesn’t work, you can try and set this via headers:

“X-UA-Compatible: IE=11”

using something like a locally hosted aloe server which will be a lot more lenient in terms of the security model, you might not even need to do this then, only testing will confirm that.

See this post for a list of other setting and explanations:

https://stackoverflow.com/questions/6771258/what-does-meta-http-equiv-x-ua-compatible-content-ie-edge-do

EDIT

As for physically altering the “Display intranet sites in Compatibility View” setting, that’s a bit of a no go as its a policy setting which could be centrally controlled by an admin so wouldn’t be guaranteed to work and could expose the browser to all sorts of problems if you start reducing the security model of a persons computer.

The file I load comes from the Resources folder (this is a desktop app).

That looks like just what I need.

That is very detailed and helpful, thanks.

[quote]
EDIT

As for physically altering the “Display intranet sites in Compatibility View” setting, that’s a bit of a no go as its a policy setting which could be centrally controlled by an admin so wouldn’t be guaranteed to work and could expose the browser to all sorts of problems if you start reducing the security model of a persons computer.[/quote]

Yes, it would have been somewhat an act of desperation. Overriding it as described above is obviously much better, and avoids the user having to alter their IE setting to make my app work. Anyway - testing soon. I may well submit a documentation update on this, too.

Thanks again.

You might also want to try IE=Edge. While it does not get you the Edge engine, it will get you the latest available version on the computer, even if that happens to be IE10.