Download and view local HTML files on an iPod Touch
I keep a personal WordPress as a notebook online along with a page that allows me to save the entire contents for offline viewing. I thought it would be useful to have this file on my iPod. I’ve written up my method here in case someone else might find it useful. This guide makes the following assumptions:
- You have 2.* software jailbroken iPod
-
Using Cydia you have installed the following:
- Mobile Terminal
- sudo
- wget
- file:// Schema in Safari
Overview
The aim is to have a simple command that can be run from the terminal on the iPod to download the HTML file. Safari is then used to view the file offline.
Setting up the aliases
Create a .bashrc file in your home directory, this is where we will store the alias settings. We will use Nano for this:
iPod:~ mobile$ nano .bashrc
Hopefully your screen now looks something like the image below.

I’m making an assumption about the filename you wish to give your downloaded HTML file, change it if you wish. In Nano you need to type the following:
alias notes='cd; mv notes.html notes~.html; wget http://www.domain.com/page.html --output-document=notes.html'
If, like me, the page you wish to download is behind a password change the dlnotes alias to the following, supplying your own username and password:
alias notes='cd; mv notes.html notes~.html; wget http://www.domain.com/page.html --http-user=username –http-password=password –output-document=notes.html’
That’s it. You can now save your .bashrc file by typing CTRL-o and answering yes to the prompt. Quit Nano by typing CTRL-x.
The iPod doesn’t always load the .bashrc file so we need to create a .profile page again using Nano and add the following code:
source $HOME/.bashrc
Finally you need to reload your .bashrc file:
iPod:~ mobile$ source .bashrc
Whenever you want to grab your HTML page for offline viewing just open the terminal and type notes. Then view the file in Safari by typing in the URL file://var/mobile/notes.html, a copy of the old HTML file will have been saved too just in case. You can setup another alias to delete the backup in the same way above, the command would be:
alias delnotes='cd; rm notes~.html'
Air Sharing
If you use Air Sharing you may want your file to be saved in its directory and be available over a network. Below is a quick guide to finding where Air Sharing stores files.
Use Air Sharing to copy a file from your computer to your iPod, make its filename unique as you will need to search for it later on. e.g. moocow.html
The rest of the work is done in the iPod Terminal. So grab your iPod and open the Terminal application. Note that I’ve highlighted the commands you type as bold.
We can use the locate command to find the file. First you will need to update the locate database. This needs to be done as root. To change to the root user type the commands below. The password will be alpine unless you’ve changed it:
iPod:~ mobile$ su
Password:<password>
iPod:/var/mobile root# updatedb
iPod:/var/mobile root# exit
Next we search for the file you copied over with Air Sharing:
iPod:~ mobile$ locate moocow.html
Note that it may take a few seconds to search, there are a lot of files on your iPod. You should get something back that looks like this:
/private/var/mobile/Applications/94724F2A-847G-371D-8H36-3DF5E659C9D2/Documents/Air\ Sharing/moocow.html
So now we know that Air Sharing stores its files here:
/private/var/mobile/Applications/94724F2A-847G-371D-8H36-3DF5E659C9D2/Documents/Air\ Sharing/
Using this information you can adjust the alias above to download your files directly to the Air Sharing directory.