Go Back   Brighthand.com - SmartPhone and PDA Discussion > Software > Windows Mobile > General Windows Mobile (Pocket PC and Smartphone)

General Windows Mobile (Pocket PC and Smartphone) General Windows Mobile discussion (not device or brand specific)

Welcome to BrightHand.com! Have a PDA or SmartPhone related question?

Register and ask it here in the forums and remove this ad

Closed Thread
 
Thread Tools
Old 07-28-2005, 05:07 AM   #1
Menneisyys
Mobile Deity
 
Join Date: Feb 2006
Posts: 2,525
Default Downloading binary files off the Web on the Pocket PC - tips and tricks

Downloading binary files off the Web on the Pocket PC - tips and tricks (and saving HTML pages that would otherwise not be savable)

Unfortunately, binary files in Pocket PC browsers (there?re no exceptions!) are treated as textual files and are always rendered so, unlike in their desktop cousins, which download them at once as binary content. This means a PPC Web browser will always try to render a, say, CAB file instead of downloading it as a binary file (thi is one of the reasons of why many PPC developers put their CAB?s in ZIP files ? ZIP files are saved by the browsers). This makes it almost impossible to easily save files.

There?re, naturally, ways of combatting this. Under Pocket Internet Explorer (PIE) (if you don?t use the MultiIE plug-in), for example, you only need to go to the cache (\Windows\Profiles\guest\Temporary Internet Files\Content.IE5\ on WM2003+ devices) and look for the file yourself in all of the subdirectories. As there?s no central index file, you?ll need to use, for example, Total Commander (TC) to look for the binary files you?ve downloaded. For example, let?s assume you?ve clicked a ScreenLock.cab file in some Web page. Then, just navigate to \Windows\Profiles\guest\Temporary Internet Files\Content.IE5\ with TC, choose File/Find Files and enter ScreenLock*.cab in the upper textfield:



Note the asterisk (*) at the end of the name. It?s needed because it?s by using indices that the PIE cache is separating files of the same name from each other. Most likely, your file will have an index [1] , but it?s better to make a more generic search.

Please note that you can?t just make PIE render a (binary) page and, then, just choose ?Save page? feature of Spb Pocket Plus (SPP) . SPP will present the menu item to do so, but this feature won?t start.

This (let PIE render the binary resource and choose Save Web Page As from the menu in the page) works, however, with MultiIE. Don?t be afraid of the .html extension of the file MultiIE creates ? it will work because, as always, it?s just a direct copy from the PIE cache.

Unfortunately, with the other browsers, this isn?t possible: ThunderHawk (TH) doesn?t cache at all and, much as NetFront (NF) does, it also includes the HTTP response headers in even binary response files in its cache. You would need to strip them first in order to get a 100% original file. (Note that I?m referring to the latest versions.)

As has already been pointed out, the PIE-based page saving in SPP and MultiIE always retrieves files from the PIE cache. This is the reason for why PIE plug-ins with page saving capabilities (SPP, MultiIE) fail at saving pages like those of the Brighthand, AximSite, iPAQ HQ and (most of) PPCT forums (FirstLoox and PPCMagazine works). These pages are stored in a non-human-readable, compressed form form in the PIE cache. (Just give it a try if you don?t believe me: try to save any BrightHand (AximSite etc) forum page and check whether you can actually read the saved page). This is why not even MultiIE will be able to retrieve these pages. If we had something like ?Save target as?, these pages could be also saved, even on PIE.

In this respect, NF is certainly better. Much as you can?t explicitly save files/pages in NF, its cache (it?s located in the cache subdirectory in the NF home, unless you configure it otherwise) is pretty easy to browse even without Tocal Commander and will always contain HTML files in a human-readable form.

Instead of using the original filenames, the cache has an index file, cache.fat, with both the source URL and the cache file it refers to. What is more important, as has been stated, the HTML pages that PIE fails at saving in textual format are all there in a human-readable form. With HTML pages (unlike with the case of binary files), the additional HTTP response headers won?t cause problems either.

So, we have two problems: a generic problem (the inability to save anything binary easily) and the compression problem of the PIE cache. What should we use in this situation? Of course, direct link saving as in the ?Save Target As? in desktop browsers.

Of the many PPC-based PIE plug-in/standalone browser programs, it?s only ftxPBrowser that is able to directly save the contents of a link (like the above-mentioned ?Save Target As? option in Internet Explorer). This works great with URL?s that have no question marks in them ? that is, URL?s that pass no GET parameters at all to the server:



Otherwise, the standard system-level Save Dialog will add the file an extension containing the question mark: it thinks it is its type and doesn?t let the user change it:



, which prohibits the file to be written to the file system (you can?t create any file in a Windows file system that has a ? or a * wildcards in them). Unfortunately, changing the Save Dialog to that of Mad Programmer won?t help either. Much as you can now change the name and, therefore, seemingly eliminate the :



Unfortunately, this means it?s entirely impossible to save any pages that have URL?s containing additional GET parameters (that is, containing a question mark).

VITO MobileDownloader 2.2 to the rescue! I?ve tested this on both platform versions and it, some smaller problems (?can?t connect? error messages now and then) aside, worked flawlessly. It saved everything I?ve thrown it at. Also, it integrates well into the PIE (but not in NF/TH!) link context menu, as a new ?Mobile Download? command. (Note that it doesn?t integrate in NF or TH!)

The only problem with VITO MobileDownloader 2.2 is that the context menus (even those of non-links, that is, the ones that have nothing to do with VITO MobileDownloader) after installation become small on SE VGA devices. This is a minor annoyance, though, and is really dwarfed by the ability to save both HTML pages that have been previously been impossible to save with PIE and binary content without the need for some manual hacking or using MultiIE.

(I had problems at first when installing the program on my WM2003SE PL720 which already had an additional connection group with a single BT connection in it. It wouldn?t connect ? neither through the AS Internet pass-through nor the active BT GPRS DUN connection. After a hard reset and not restoring anything, it worked OK via the AS Internet pass-through and the newly-created GPRS DUN connection).
__________________
Microsoft MVP - Mobile Devices, 2006, 2007. Also see my articles in the PPC & SP Mag Expert blog HERE.
Menneisyys is offline  
Old 01-22-2006, 11:25 AM   #2
Menneisyys
Mobile Deity
 
Join Date: Feb 2006
Posts: 2,525
Default

I've finished writing a large report on a generic Pocket Internet Explorer bug I've just discovered. If you have problems dowloading files from Web sites that use Referer-based filtering to avoid linking files from unrelated sites, you will definitely want to read http://www.pocketpcmag.com/blogs/ind...3&p=464&more=1
__________________
Microsoft MVP - Mobile Devices, 2006, 2007. Also see my articles in the PPC & SP Mag Expert blog HERE.
Menneisyys is offline  
Old 01-22-2006, 02:44 PM   #3
Menneisyys
Mobile Deity
 
Join Date: Feb 2006
Posts: 2,525
Default

I've just published a benchmark of file download efficiency/speed of all the download-capable Pocket PC browsers/add-ons, including the beta version of Opera, NetFront 3.3 TP 1.03, PIE and the two additional PIE-based download-enablers, ViTO Downloader and ftpxPBrowser. As it is shown, PPC browsers have tremendously different download speeds/efficiency when it comes to download files to the storage card. The article is really worth reading if you often download files with Pocket PC-based browsers using high-speed connections and wondered whether you can speed up the downloading process.

Please see http://www.pocketpcmag.com/blogs/ind...3&p=466&more=1 for more info.
__________________
Microsoft MVP - Mobile Devices, 2006, 2007. Also see my articles in the PPC & SP Mag Expert blog HERE.
Menneisyys is offline  
Old 01-23-2006, 12:51 AM   #4
Gerard
Mobile Deity
 
Gerard's Avatar
 
Join Date: Sep 2000
Location: Vancouver Canada
Posts: 5,097
Default

I am puzzled by your statement that "This means a PPC Web browser will always try to render a, say, CAB file instead of downloading it as a binary file." This is not true. In my (rather extensive) experience of downloading files using Pocket IE (started in June, 2000), I have found that at least half the CAB files tapped trigger the Save As... pop-up dialogue. This is well known as being related to MIME type configuration at the server side being insufficiently exact for the expectations written into all versions (at least up to WM2003SE) of Pocket IE. Correctly configured servers will enable CAB, WMV, and other 'difficult' types to download just as easily as ZIP files.
PHP-based sites can also cause problems. One blatant example is Handango, where files often present in the Save As... pop-up with the 'Open when download completes' box greyed out, and the file name of 'download.asp' instead of a proper name. The correct file is received, but must be renamed to *.zip or *.exe extension to facilitate opening/launching.

There is nothing 'new' in any of this. And Vito's Downloader is one possible solution, but every version I have tested soon fails to work properly. EZDownload provides a simple solution, which requires only that one be able to copy the file URL to the clipboard. MultiIE has a tap&hold 'Copy link address' option which allows this.
__________________
Gerard Ivan Samija
Microsoft MVP
forum moderator for
PocketPCFAQ.com
Gerard is offline  
Old 01-23-2006, 12:58 AM   #5
Menneisyys
Mobile Deity
 
Join Date: Feb 2006
Posts: 2,525
Default

Quote:
Originally posted by Gerard
And Vito's Downloader is one possible solution, but every version I have tested soon fails to work properly. EZDownload provides a simple solution, which requires only that one be able to copy the file URL to the clipboard. MultiIE has a tap&hold 'Copy link address' option which allows this.
Thanks for the feedback! I've indeed forgotten to test EZDownload. Will do it right now. Thanks again!
__________________
Microsoft MVP - Mobile Devices, 2006, 2007. Also see my articles in the PPC & SP Mag Expert blog HERE.
Menneisyys is offline  
Old 01-23-2006, 03:35 AM   #6
Menneisyys
Mobile Deity
 
Join Date: Feb 2006
Posts: 2,525
Default

Updated the two articles with the due credits; see http://www.pocketpcmag.com/blogs/ind..._an_exc&more=1
__________________
Microsoft MVP - Mobile Devices, 2006, 2007. Also see my articles in the PPC & SP Mag Expert blog HERE.
Menneisyys is offline  
Closed Thread


Thread Tools


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Definitive guide to downloading files, images and saving Web pages with Web browsers Menneisyys General Windows Mobile (Pocket PC and Smartphone) 1 10-15-2006 12:25 PM
New user ... looking for tips and tricks jchardeman Audiovox 6700 / UTStarcom xv6700 0 05-18-2006 12:30 PM
Tips and Tricks for zLauncher PALM MASTER Tungsten T series 9 01-05-2003 04:14 PM
tips and tricks in video ptorrone General Windows Mobile (Pocket PC and Smartphone) 0 09-07-2002 04:46 PM
need help with tips & tricks cannibal-horn General Windows Mobile (Pocket PC and Smartphone) 2 12-30-2001 09:00 PM


All times are GMT -5. The time now is 11:11 PM.



Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  About Us  |  Advertising  |  Site Map  |  Contact Us  |  Submit Review  |  RSS Feeds  |  Jobs




All Rights Reserved, Copyright 1999 - 2007, TechTarget | Read our Privacy Policy
  TechTarget - The Most Targeted IT Media