Download CAB file in Pocket PC IE
The most common problem we face while downloading a CAB file using PIE (Pocket PC Internet Explorer) is, it renders the content of the CAB file instead of downloading it to local Main Memory.
The reason for this is very simple: the servers don’t set one of the returning HTTP response headers, Content-Type, correctly, but leave it at the default text/plain type.
Solution to this problem is to set proper MIME type in code.
Option 1: Set proper MIME type setting at Web Server.
For example, in Tomcat one can specify the same at web.xml file for extension .CAB
<mime-mapping>
<extension>CAB</extension>
<mime-type>application/vnd.ms-cab-compressed</mime-type>
</mime-mapping>
Option 2: For a specific link use ‘type’ attribute of <a>
For example,
...
<a type="application/vnd.ms-cab-compressed" href="./file.CAB">Download</a>
...
MIME type “application/x-msdownload” can also be used for this purpose.

Posted by Hardik