Drag this to your bookmarks in Safari or IE:
Then sync your bookmarks with your iPhone/iPhod using iTunes.
To test it on a PDF, click this link, then run the bookmarklet. This will give you a link to the offline version of the PDF, which you can bookmark. Then disable the internet connection on your device, and attempt to return to your bookmarked PDF: