iframes and mixed content in IE - ajax

My goal is to embed this webpage "brokercheck.finra.org/Search/Search.aspx" into a visualforce page. I'm using an <apex:iframe/> to do this. I've tried html iframes too.
In IE8, I'm getting a message saying "do you want to view the webpage that was delivered securely" the http content only works if the user clicks no. (which is not a good practice).
on the bottom of the page I'm getting a warning that says:
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; MS-RTC LM 8)
Message: Permission denied
Line: 6
Char: 152
Code: 0
URI: http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js
Is there anything I can do on my end to get around the popup?
I've tried a few things, but nothing has been fruitful...

You're mixing an encrypted (https) content of visualforce / regular salesforce pages with unencrypted http. And sadly this website doesn't seem to have a secure version.
I'm afraid there's not much you can do, this "mixed content" warning is just a feature of IE. In fact I think it'd be pointless if websites could somehow suppress it ;) You can read about it on MSDN and the simplest thing is to ask users to modify their security settings.
You could try playing with Javascript, maybe loading content from finfra with some AJAX call... But that will be most likely treated by IE as cross-domain JavaScript and also blocked. Can you maybe simply show this page as a link / popup window? Or simply make REST GET call(s) to it server-side and display pieces of content?

Related

Detect if Chrome Frame BHO is enabled

I have the following code to detect to see if CF BHO is enabled, but unfortunately it didn't work out, it alway returns "automation server failed to create obj"
var activexGoogleFrameBho = new ActiveXObject('ChromeFrame.Bho');
if (activexGoogleFrameBho) {
...
}
My user agent and page header are as following:
mozilla/4.0(compatible; msie 8.0; windows nt 6.1; wow64; trident/4.0;
chromeframe/32.0.1700.107; slcc2; .net clr 2.0.50727; .net4.0c; .net4.0e)
<meta http-equiv='X-UA-Compatible' content='IE=Edge,chrome=IE8'/>
any ideas?
Thanks,
I'm not sure if you can detect the helper object itself though to see if the current page is loaded in chromeframe you can check if window.externalHost exists.
http://www.chromium.org/developers/how-tos/chrome-frame-getting-started/understanding-chrome-frame-user-agent#TOC-From-the-script-on-the-web-page

Overriding the Internet Explorer 8 Browser Mode in an intranet environment

I am working on an intranet website within a corporate company where there is the Internet Explorer 8 (running on Windows XP, so cannot upgrade to IE9) used as a standard (and the only one) browser and I am dealing with the Compatibility View Mode feature. The website is based on ASP.NET 2.0 and the web server is Windows Server 2003 with IIS6.
It is not possible to switch to any other browser because some other critical third party web based applications require Internet Explorer (and ActiveX) to run properly.
I would like to ask whether there is a way how to (programmaticaly, using a http header ...) override the Internet Explorer's browser mode in case the Compatibility View Mode is turned on for Intranet websites by default or, in other words, how to force the Internet Explorer to use the IE8 Browser Mode rather than the IE8 Compatibility Mode.
I have tried to add the X-UA-Compatible http header set to IE=Edge (or IE=8) in the IIS configuration but it only affects the Document Mode, never the Browser Mode.
Thanks for any help.
Browser mode refers to the user-agent string and, IIRC, it controls the UA string that's sent to a server during HTTP negotiation. The only documented way to control that is to use the F12 developer tools.
You may want to look at Enterprise Mode[1] (EMIE), supported for Win 7 and later. When EMIE is enabled for IE, IE11 behaves and acts like IE8. This includes the UA String.
You are correct, x-ua-compatible controls only the document mode. There was a feature control key (FEATURE_BROWSER_EMULATION [2]) that might've helped, but it's unclear whether that's still supported in current versions of IE. (See the Extensibility Improvements link on that page for technical details.)
Hope this helps...
References:
[1] - http://technet.microsoft.com/en-us/library/dn640687
[2] - http://msdn.microsoft.com/en-us/library/ie/ee330730(v=vs.85).aspx#browser_emulation

Mootools Issue in IE8

I am having an issue with Mootools. If you go to this page RTDS you'll notice a login button in the top right. On all other browsers (IE9, Safari, Chrome, and Firefox) the login works fine but it doesn't work in IE8. IE says its an error related to moo tools but I don't really know what it means or how to fix it. The error is as follows:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.3; .NET4.0E)
Timestamp: Wed, 8 Feb 2012 02:26:00 UTC
Message: 'null' is null or not an object
Line: 66
Char: 2
Code: 0
URI: http://www.hanseninfotech.com/rtds/templates/beez5/javascript/md_stylechanger.js
Message: Object doesn't support this property or method
Line: 473
Char: 25
Code: 0
URI: http://www.hanseninfotech.com/rtds/media/system/js/mootools-core.js
Has anyone ever seen this or have any information on how to fix this?
if you use Firebug for Firefox, you'll see there is an error on md_stylechanger.js script.
As it seems you don't use it (it modifies size of fonts), get rid of the file.
And update to joomla 2.5, 1.7 won't be supported any more soon.

Bring back mobile version of website in WebBrowser control for wp7?

Is it possible to bring back web pages in a mobile format, if available, before showing the normal rendering of a web page? I noticed I was getting both when I used it. Or is this enabled by default?
EDIT: For example in ie on the phone you can request to recieve webpages in a mobile version or desktop version. Is this option available to developers and if not what is the default for the control?
Sadly, there's no API for toggling this setting - and no easy way to intercept the outgoing HTTP calls from the browser control.
Looking at some output from the emulator it looks like the mobile/full setting toggles this in the User-Agent:
Mobile -
Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+Phone+OS+7.0;+Trident/3.1;+IEMobile/7.0;+Microsoft;+XDeviceEmulator)
Desktop -
Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+6.1;+XBLWP7;+ZuneWP7)
Here also are some mobile agents captured "in the wild" - http://www.elucidsoft.com/blog/2010/11/19/windows-phone-7-user-agents/
It looks like this settings is a global setting for the OS - so whatever the user chooses in the browser settings is also used in your app (I think this is what I just saw).
I had this problem for a very, very long time and I finally figured it out with the following:
string header =
"User-Agent:Mozilla/5.0 (iPhone; U;
CPU iPhone OS 4_1 like Mac OS X;
en-us) AppleWebKit/532.9 (KHTML, like
Gecko) Version/4.0.5 Mobile/8B117
Safari/6531.22.7";
MyWebBrowser.Navigate(new
Uri("http://www.google.com"), null,
header);
The following header DID NOT work for me (on the gmail website):
Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+Phone+OS+7.0;+Trident/3.1;+IEMobile/7.0;+Microsoft;+XDeviceEmulator)
The WebBrowser control does not expose an API that enables you to choose between the Desktop or the Mobile version of a web page. You could use Fiddler to trap the traffic for outgoing requests (from the emulator or a device) to see if there's anything in particular about the request that you might be able to replicate in yoru own requests.

Window Media Player issues two requests for the audio on web page

I'm using Windows Media Player in a web page. I have version 11 installed so that is the version I'm testing with right now. The player is embedded on the page with this HTML:
<OBJECT id='MS_mediaPlayer' width="400" height="45" classid='CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6'
codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'
standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'>
<param name='autoStart' value="false">
<param name='uiMode' value="invisible">
<param name='loop' value="false">
</OBJECT>
I'm calling in JavaScript:
MS_mediaPlayer.URL = "SomeAudioFile.mp3"
MS_mediaPlayer.controls.play();
When I look at Fiddler I can see that the player actually downloads "SomeAudioFile.mp3" twice. Is there some setting I have wrong? I was trying to set the "autoPlay" to true and avoid calling "play()". Got the same result - two downloads.
UPDATE:
The first request's user-agent is "Windows-Media-Player/11.0.5721.5268". The second has "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB6; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)". Looks like the browser is running the same request the second time. No Idea why
Any ideas?
UPDATE (4/1/10):
Still no solution.
I debugged the JS thoroughly and there is only one call to MediaPlayer.URL='.....' to set the audio file. Nothing else triggers the media player to load the file and there is no other place referencing the audio file on the page.
One other interesting fact is that this doesn't happen (the double loading of the audio) when I run the browser locally on my development web server. But other remote requests to the same web server generate the double audio loading.
I believe I eliminated any correlation with specific IE version or media player version. This happens with IE6-8 and WM9-12
You have to examine the requests carefully. Sometimes, you'll see a media player make two requests because they are using HTTP Range requests (and not requesting the whole file). Look for a "Range" request header. Also check to make sure that neither of the requests uses the HEAD method, because that simply retrieves the server's response headers.
Also, if either of the sessions shows as aborted in the Fiddler Session List ("do not enter icon, red circle with a line through it") it means that the client closed the request in the middle. That might occur if the component starts the download, aborts it, and then restarts it. Why it might do that, I'm not sure.
You might try looking at other sites that use WMP and see whether you see two requests for them.

Resources