Posts Tagged ‘pocket internet explorer’

Programmatically getting last visited page from Pocket Internet Explorer

Tuesday, February 17th, 2009

I wrote earlier about my hack for syncing my browsing between my computer and mobile.

One of the most fiddly bits of implementing this was how to get the last visited page from Pocket Internet Explorer on my phone. In case this is useful to anyone, here is a quick description of how I did it.

I wrote the code to get the last visited page in C++. I couldn’t find any way to access the browser, or the address bar, programmatically.

The closest I could find is a set of Windows Internet Services API calls which let you have direct access to the browser cache used by Pocket Internet Explorer.

I wrote the code for Pocket Internet Explorer on Windows Mobile, but to the best of my knowledge it should work on regular Internet Explorer. I’ve not tried it because, let’s be honest, who uses Internet Explorer? 😉

The approach was to use FindFirstUrlCacheEntryEx and FindNextUrlCacheEntryEx to enumerate through the INTERNET_CACHE_ENTRY_INFO entries in the Internet cache.

Each INTERNET_CACHE_ENTRY_INFO item stores (amongst other information) the URL it was downloaded from, and the time the cache item was last accessed.

So I find the last page the user has visited by enumerating through the cache, and store the URL for the cache item with the latest last-accessed time.

(more…)

But, I like transcoding!

Sunday, April 20th, 2008

screenshot - Image Hosted by ImageShack.usMobile transcoding – services which turn a webpage into something better suited for a mobile web browser – is an often contentious topic. It’s a topic which has come up several times recently, and at best people will begrudgingly describe it as a necessary temporary evil.

Don’t get me wrong – it hasn’t been without problems. It has been used in inappropriate ways, and I know web-developers whose sites have been broken by poor (and inflicted!) uses of mobile transcoding.

But as a practical, day-to-day tool – I kinda like it.

I started using Google’s transcoder (GWT) because when you use the mobile version of Google’s RSS reader, any links you click on are transcoded by GWT for you. And I find it very useful.

It creates efficient pages which render well in Pocket Internet Explorer. Plus it stops my phone trying to download some ridiculously large webpages over GPRS (argh… curse web-developers who have 1MB webpages on the front of your sites!).

It also adds a link to any RSS feeds it finds in a page at the top – clicking on which will take you to the feed in Google Reader (my RSS reader of choice at the moment), from where you can subscribe to the feed. (Slightly roundabout, but the only way I know to subscribe to new feeds from Google Reader Mobile).

I like.

But it’s a bit of a faff getting a page transcoded by GWT if you aren’t already given a link to a transcoded page. So (in the tiny window between tonight’s screaming fits… gah – when will the baby start sleeping through the night?!) I added a new tool to my set of Pocket Internet Explorer (PIE) extensions: one that will re-open the current page using Google mobile transcoder.

(more…)