12

Does anyone know if its possible to save an HTML file to your iphone and then open it with Safari so that you can then favourite it and have it appear on the launcher as an icon?

5
  • If your iPhone is up-to-date (iOS 5.x), check out these tips: apple.com/iphone/tips
    – iglvzx
    Feb 1, 2012 at 2:09
  • Did you mean copying an HTML file from a computer to the iPhone's home screen? There is no official way of doing this. There may be a way to do it if your iPhone is jailbroken, since you have access to the file system.
    – iglvzx
    Feb 1, 2012 at 2:26
  • Yes, that is what I meant. I have html file that does multiple cross site xmlhttprequests, which for most browsers are only allowed if the file came from a local file system and not from a server.
    – kiasecto
    Feb 1, 2012 at 3:00
  • Are you still looking for an answer to this question?
    – bmike
    Jul 8, 2012 at 13:34
  • It'll be a text only html as images are not loaded. Fixes? Upload html to Messenger app. FB provide the content delivery network cdn.fbxbs.com and html, remote linked url gifs work. Alternatively, download html, open, print to PDF works on iphone.
    – StevoKeano
    Nov 14, 2023 at 17:41

8 Answers 8

5

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.

3

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.

2
  • 1
    Are you trying to copy an html file that you've created or just add a link to the home screen?
    – afragen
    Feb 1, 2012 at 2:38
  • 3
    An explanation for a downvote would be appreciated.
    – afragen
    May 10, 2012 at 15:27
1

I've done this using Microsoft OneDrive to generate a URL for an uploaded file. iframe embed code can also be used to display and interact with an Excel spreadsheet online.

1

I just put the HTML file in my DropBox and then opened it in my iOS DropBox app and then touch the ThreeDots and MakeAvailableOffline. It then opens thru the DB app while I am in airplane/offline or outside cell coverage.

0

HTML file I'm assuming you are talking about some pages on the web.

If so yes you can by pressing on the:

and you will have the icon on your homescreen to use it next time.

But for your information this is not the actual saving of that page it just like a favorite bookmark icon which can make you easily access to that page with a touch!.

But if you want to really save that page in an offline mode then you have to jailbreak your phone and get a tweak from Cydia which will give you an option to save it as an offline to open it next time.

And last thing if I was wrong for the above answer. And you were talking about actualy HTML code page and you want to save them and open to view the code [Source codes]

then you probably need an app from appstore [or even from cydia] or tweak from cydia to do that otherwise you can't.

0

What works for me is to actually save the desired web page as a Web Archive from within Safari on the Mac, then have this file emailed to myself. On the iPhone, the only software I have that managed to open this Web Archive file successfully is GoodReader.

0

The only way I know of without jailbreaking is to use Dropbox.

1
  • 2
    Or any other file syncing app like SugarSync, Air Sharing, Good Reader and more.
    – nohillside
    Jul 8, 2012 at 16:52
0

To get the Page to your Phone there are a lot of ways to do this. You can use any Cloud Drive App you like (iCloud, OneDrive, Dropbox) it will also Work via Mail or if you have an App that Supports in App Transfer via iTunes etc.

To open/view thre Page you can use any HTML Editor App on the Phone but i have found none of them beeing able Preview the Page in Safari all of them had their own HTML Preview.

A Second Downside is that if you are somehow able to Preview the Page inside of Safari from within an App the actual File of the Page is just put to a temp Folder and when you exit the Editor App the File will get deleted.

Now if you later open the Page again over the in the Homescreen saved Icon it won't work cause it isn't there anymore.

If you don't mind opening a App before opening the HTML File you can use one of the Editors or even GoodReader which can also handle HTML Files.

If you really need it to be a Icon i recommend you to write a Simple App with Just a UIWebView in it which displays your Page. If you don't know how to do a iOS App there are many Sites out there which can help you just Google for "iOS App + UIWebView".

You must log in to answer this question.