English 中文(简体)
Determine Mobile Internet Explorer version
原标题:

I need to determine the version of Mobile Internet Explorer on a Windows Mobile 6.1 device. So that I can report the same user-agent string as is being used by Mobile Internet Explorer. The user-agent string format has recently been changed to include version information.

My application is running on the Windows Mobile device creating a browser shell using the WebBrowser control.

The ObtainUserAgentString() API is not returning the same value as Mobile Internet Explorer is using.

When I try to get the version information from "IExplore.exe", GetFileVersionInfoSize() is returning 0, with a GetLastError() of 0x716. Most likely because IE Mobile is XIP.

Is there another way to determine the Mobile Internet Explorer version?

问题回答

I don t know about IEMobile s own APIs, but how about injecting some JScript into the browser control s Document and accessing navigator.userAgent?

(Be prepared for headaches with Windows Mobile 6.5 though. The WebBrowser control doesn t behave in the same way as the browser itself. And the version number of IEMobile is the same on 6.5 as it is on 6.1.4, despite the rendering between the two being very different. Sigh.)

IE mobile generally uses a user-agent with something like "Windows CE" or "Windows Mobile". To determine this, just do a simple:

myUserAgentString = request.getHeader("User-Agent")
if ( myUserAgentString.indexOf("CE") >= 0 || myUserAgentString.indexOf("MOBILE") >= 0) {
  //this is IE
}

Once you detect that then you can treat that the same as IE, if that s what you want.





相关问题
Image rendered with wrong colors in IE8

I have a gradient image as a PNG (no transparency) in a web-page. By taking a screenshot of Chrome showing the page and cropping the image from the page, I see the exact same colors are drawn as the ...

Determine Mobile Internet Explorer version

I need to determine the version of Mobile Internet Explorer on a Windows Mobile 6.1 device. So that I can report the same user-agent string as is being used by Mobile Internet Explorer. The user-...

CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

Internet Explorer only part loading JavaScript/CSS

I m having trouble with my local development environment where IE (6 through to 8) is only part loading JavaScript/CSS files. It throws random errors at random places in jquery.min.js every time I ...

IE doesn t run Javascript when you click back button

I ve built a shop with tons of JS running. One of the pieces of the cart, is a zip code field which is required to calculate shipping cost. This works fine going through the cart. Now clicking ...

热门标签