Can I save an HTML file to my iPhone and open in Safari?
Solution 1:
I do it using the 'Notes' app on my iphone. Quick and free download.
I emailed the file to myself, then opened it on my phone via email. Inside the email, I clicked the html file. This opened it. I then clicked the download button on the top right of my particular iphone. After that I clicked "Add to Notes".
Inside the notes app, my html file is there and also all functions work as there is also javascript involved.
Solution 2:
Once the page is opened on your iPhone all you have to do is tap the Sharing icon, middle icon on bottom, and select 'Add to Home Screen'
If you want to load an html file that you've created on you Mac to your iPhone you'll need to do the following. From System Prefs > Sharing > Enable Web Sharing. Place the html file in your ~/Sites folder. Go the the URL listed in the Web Sharing panel from your iPhone, while on the home network, and open the html file. It will load in Mobile Safari.
If you want this to stay on your iPhone you'll need to have the page written in html5 and have a properly setup CACHE MANIFEST. This includes the appropriate tag in the html file and have the proper manifest file. Then you can follow the first step and add it to your home screen and always have it on your iPhone.