Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

yacoub

macrumors member
Original poster
Oct 13, 2007
36
0
There's got to be a way to direct Safari to load a file stored locally on the device... just not sure what syntax to use and where to store those files.

Anyone have insight on this?

Thanks.
 

badtzmaru

macrumors 6502
Jul 1, 2007
472
2
You can't do that with the iphone. There is no support for offline browsing or the file:/// protocol.

You'd have to hack the iphone and create your own app. Or you could create an ebook and use with the ebook reader app.
 

yacoub

macrumors member
Original poster
Oct 13, 2007
36
0
ah wow, that's a shame. i really want to get these files compiled into an app but have no idea how I'd take HTML, JavaScript, and PNG images and put them into an app that can stand alone on the iPhone/touch.
 

yacoub

macrumors member
Original poster
Oct 13, 2007
36
0
Actually if you install Apache from AppTap Installer you CAN access local content and it solves my need wonderfully :D
 

cwolves

macrumors regular
Oct 11, 2007
120
0
- install apache on the ipod
- put files in /Library/WebServer/Documents/
- navigate to http://127.0.0.1/

or...

- base-64 encode any images and put them in your file as: <img src="data:image/gif;base64,[[BASE 64 GIBBERISH GOES HERE]]">.
- base-64 encode your entire html file, any js or css embeded.
- make a link to your file: <a href="data:text/html;base64,[[BASE 64 GIBBERISH GOES HERE]]">.
- Visit page on ipod
- click link
- bookmark link
- visit when offline


Path #1 is easier, but only you can use it.
Path #2 can be used by anyone. This is the only way to make offline safari apps at the moment.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.