Noob Q. Any Way to Cache web pages?

Discussion in 'iPod touch' started by Kerryjapan, Dec 4, 2007.

  1. Kerryjapan

    Kerryjapan New Member

    Joined:
    Dec 4, 2007
    Messages:
    1
    Likes Received:
    0
    I live in Japan and free WiFi hotspots are few and far between... They have plenty of WiFi but it's all pay to play.

    I would like a way to maybe sync some of my favorite web sites (like some news pages..blogs, ect) from home and then be able to access these pages later in the day when there is no WiFi available.. Anyone know of a way?

    Appologize if this is a really stupid question but I just picked up this unit yesterday and need to get schooled up quickly as I have a trip out of the country coming in a few days..

    Thanks.

    Please Register or Log in to view images

  2. lvlln

    lvlln New Member

    Joined:
    Nov 10, 2007
    Messages:
    312
    Likes Received:
    1
    Check out the iPod Touch Applications section of this forum. There are two topics on downloading stuff from the web, and one of them links to an app called "HistoryDL," which allows you to download any page/file that you access on Safari. I've used it and it works, but it will ONLY download the HTML, meaning no images. It's not an ideal solution, but it's the best there is so far.
  3. Scythal

    Scythal New Member

    Joined:
    Nov 27, 2007
    Messages:
    413
    Likes Received:
    4
    Device:
    iPod touch
    Safari can't access files stored on the iPod (using file://<path>), they removed this capability for now because of security issues they have with the browser. Which means you will have to trick Safari into believing the pages are in the cache, or find a way to select what remains in the cache - I know it's the title of your thread, but it's just to point out that the easy way won't work unfortunately.

    There is another solution: I toyed with the idea of using an http sever on the iPod to host web applications a few days ago, as described here. With the same principle, you can rip web pages, store them on the iPod and look at them off the air. I'm sure you will find a lot of programs that do the ripping effortlessly.
  4. lvlln

    lvlln New Member

    Joined:
    Nov 10, 2007
    Messages:
    312
    Likes Received:
    1
    The Apache server works, too. Just install it from the Installer, then point Safari to 127.0.0.1, which will get you to Library/Webserver/Documents. Any file stored in there will be accessible.
  5. inatightspot

    inatightspot New Member

    Joined:
    Nov 24, 2007
    Messages:
    173
    Likes Received:
    2
    Would it be possible to set up a symbolic link to Library/Webserver/Documents/ so that when the page is saved online in my bookmarks I can access it off-line from 127.0.0.1?


    Jim
  6. Scythal

    Scythal New Member

    Joined:
    Nov 27, 2007
    Messages:
    413
    Likes Received:
    4
    Device:
    iPod touch
    You can copy your saved pages there, I don't think a symbolic link would be a good idea: if there was a file to link to, it would be in the cache and directly accessible by Safari. Besides, Safari could decide to erase it.

    Where is this cache anyway? I've seen that the process was running in background once you started it, and if you killed the process the cache was apparently emptied.
  7. ayuzer

    ayuzer New Member

    Joined:
    Sep 30, 2007
    Messages:
    259
    Likes Received:
    1
    if you just want the current webpage your on (useful for looking at wether more in-depth than weather app) you can just load it up at your house then make a new tab for other webpages you want to preload than just clsoe safari app. Even when wifi is off, the preloaded webpages are still viewable, just that you cant goto new links
  8. Scythal

    Scythal New Member

    Joined:
    Nov 27, 2007
    Messages:
    413
    Likes Received:
    4
    Device:
    iPod touch
    But as I said, it will be wiped out if the process dies. Switch the iPod off and your cache will apparently be emptied, next time you switch the iPod on and start Safari, you need to reload the page from the website.

    History and cookies are kept though.
  9. Scythal

    Scythal New Member

    Joined:
    Nov 27, 2007
    Messages:
    413
    Likes Received:
    4
    Device:
    iPod touch
    I found something interesting that reminded me of your question.

    There is a way to store an entire web page into a bookmark, this is the URL data format as specified in RFC 2397. Here is an example you can copy/paste on the address of your browser (triple-click to select the whole of it):

    Code:
    data:text/html;base64,PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDMuMiBGaW5hbC8vRU4iPgo8SFRNTD4KIDxIRUFEPgogIDxUSVRMRT5JbmRleCBvZiAvZnRwPC9USVRMRT4KIDwvSEVBRD4KIDxCT0RZPgo8c2NyaXB0IHR5cGU9InRleHQvamF2YXNjcmlwdCIgc3JjPSJodHRwOi8vZXJpY2FzYWR1bi5jb20vaW5jbHVkZS9oZWFkZXIuanMiPiA8L3NjcmlwdD4KCjxzY3JpcHQgdHlwZT0idGV4dC9qYXZhc2NyaXB0IiBzcmM9Imh0dHA6Ly9lcmljYXNhZHVuLmNvbS9pbmNsdWRlL2Nzcy5qcyI+IDwvc2NyaXB0Pgo8UFJFPjxJTUcgU1JDPS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9Ii9pY29ucy9mb2xkZXIuZ2lmIiBBTFQ9IltESVJdIj4gPEEgSFJFRj0iUHVtcGtpblV0aWxpdGllcy8iPlB1bXBraW5VdGlsaXRpZXMvPC9BPiAgICAgICAyNC1Ob3YtMjAwNyAxNzozNCAgICAgIC0gIAo8SU1HIFNSQz0iL2ljb25zL2ZvbGRlci5naWYiIEFMVD0iW0RJUl0iPiA8QSBIUkVGPSJTeXN0ZW0vIj5TeXN0ZW0vPC9BPiAgICAgICAgICAgICAgICAgMTktT2N0LTIwMDcgMTQ6MDQgICAgICAtICAKPElNRyBTUkM9Ii9pY29ucy9mb2xkZXIuZ2lmIiBBTFQ9IltESVJdIj4gPEEgSFJFRj0iVGVzdC8iPlRlc3QvPC9BPiAgICAgICAgICAgICAgICAgICAwNC1EZWMtMjAwNyAxMToxMyAgICAgIC0gIAo8L1BSRT48SFI+Cjx0aXRsZT5FcmljYSBTYWR1bjwvdGl0bGU+Cjxib2R5Pgo8Y2VudGVyPjxpZnJhbWUgZnJhbWVib3JkZXI9IjAiIHNyYz0iaHR0cDovL2VyaWNhc2FkdW4uY29tL2luY2x1ZGUvZm9vLmh0bWwiIHdpZHRoPSI0ODgiIGhlaWdodD0iODAiPjwvaWZyYW1lPjwvY2VudGVyPgo8c2NyaXB0IHR5cGU9InRleHQvamF2YXNjcmlwdCIgc3JjPSJodHRwOi8vZXJpY2FzYWR1bi5jb20vaW5jbHVkZS9mb290ZXIuanMiPiA8L3NjcmlwdD4KPC9ib2R5Pgo8L0JPRFk+PC9IVE1MPgo=
    

    The limitation is around 128 kBytes for the iPod Safari browser. You can encode your pages then store them as bookmarks, you are then able to access those pages everywhere. You will find some explanations here:

    http://www.hackszine.com/blog/archive/2007/07/offline_iphone_apps_with_rfc_2.html

    An encoder (select HTML, base 64 encoding and text/html MIME type):

    http://www.scalora.org/projects/uriencoder/

    Of course this is not perfect, there is a need for an encoder application on the iPod itself, that takes the images based on a selection, it would be much easier.

    Another obvious usage is encoding web applications for the iPhone/iPod.
  10. Happyhow

    Happyhow New Member

    Joined:
    Oct 16, 2007
    Messages:
    36
    Likes Received:
    0
    You guys really impress me (an IT dummy) not that I can implement any of your ideas. Keep up sharing. It makes my iTouch purchase and pod-exposure all the more worthwhile.

    I have the same "save a web page" problem, and as my wife and I are off to North Conway, NH for the weekend , and I thought that I'd "play IT whiz kid ! and "save" all the Google map sections of our trip from MY HOME --> NORTH CONWAY .

    I reasoned that I could :
    * crop and convert map sections to jpeg and
    * let each section sit as a photo thumbmail within the "cover" page my "Trip" photo album)
    * together they would layout the geo-area of our trip, and then
    * all I'd have to do* would be to click a thumbnail and
    * the detailed map section would pop up like a photo.

    Well it was not to be!. I had trouble building the bits via Google Maps and then more trouble with the individual detail maps @ 72 pixels/in -- it seemed as though Apple fuzzied-up my jpegs when resizing for the pod !

    Well I had an hour of fun that made me realize just how amazing Google's dynamic Map & Font scaling on the Web is. So you can see that I too await a fully functioning Google Maps for the iTouch. One that can save its "trip notes and maps" for viewing along a wi-fi-less highway !

Share This Page