Kitz Forum

Computers & Hardware => Apple Related => Topic started by: Weaver on May 12, 2020, 12:20:36 AM

Title: Saving an icon that contains an html file
Post by: Weaver on May 12, 2020, 12:20:36 AM
I have written an html file (xhtml5 in fact) and I can display its contents in Safari on my iPad. What I would like to do is create an icon on the desktop which displays the html file. This half works; I can sometimes see the file, but sometimes I get an error message, something about localhost.

Is there a known method for achieving this?
Title: Re: Saving an icon that contains an html file
Post by: chenks on May 14, 2020, 09:37:51 AM
so you essentially want to create a shortcut to the webpage?
do you have a favicon.ico set in the code (and placed in the webserver)?
Title: Re: Saving an icon that contains an html file
Post by: Weaver on May 14, 2020, 09:47:15 AM
I don’t have a webserver, that’s the problem. I can set a favicon But I wouldn’t know where to park the image. All I have is an html file and I wondered if I could store it and display it on the desktop accessible via an icon, so that when you click on it you see the content. I don’t have a location, or url for it.

I could perhaps park it on the web somewhere, but I’m not sure where and getting some web space set up just to park one file seems like a bit of a pain. That would solve the problem though, as I see there’s a command in Safari to place a link on the desktop.

If there’s no other way of doing it then I would have to think about finding some web space from somewhere. I and Mrs Weaver have lots of domains but I only use them for email, have not even bothered to set up web servers associated with any of them.
Title: Re: Saving an icon that contains an html file
Post by: chenks on May 14, 2020, 11:03:56 AM
the favicon.ico can be anywhere as long as the code in the HTML file is pointing to it.

try this
https://realfavicongenerator.net/

for apple devices you need to create a few different sizes depending on the device.
example

Code: [Select]
<link rel="icon" type="image/png" href="/includes/images/favicon.png">
<link rel="apple-touch-icon" href="/includes/images/touch-icon-iphone.png">
<link rel="apple-touch-icon" sizes="152x152" href="/includes/images/touch-icon-ipad.png">
<link rel="apple-touch-icon" sizes="167x167" href="/includes/images/touch-icon-ipad-retina.png">
<link rel="apple-touch-icon" sizes="180x180" href="/includes/images/touch-icon-iphone-retina.png">
<link rel="icon" sizes="192x192" href="/includes/images/android-icon.png">
<meta name="msapplication-square310x310logo" content="/includes/images/microsoft-icon.png">
Title: Re: Saving an icon that contains an html file
Post by: jelv on May 14, 2020, 05:18:45 PM
You should get a Windows PC! Double clicking an html file or a shortcut pointing to the file will open it in the default browser.
Title: Re: Saving an icon that contains an html file
Post by: Weaver on May 14, 2020, 05:56:51 PM
Jelv - that’s the reason I’m thinking like this.

@chenks - the favicon isn’t the issue as far as I am aware; I just get an error sometimes and can’t see the html document content
Title: Re: Saving an icon that contains an html file
Post by: burakkucat on May 14, 2020, 05:59:32 PM
If you were to right-click on the icon, are you given options as to how to open it?

If yes, is there the option to open it in your default browser?
Title: Re: Saving an icon that contains an html file
Post by: chenks on May 14, 2020, 06:03:08 PM
If you were to right-click on the icon, are you given options as to how to open it?

If yes, is there the option to open it in your default browser?

how does one "right click" on an ipad?
Title: Re: Saving an icon that contains an html file
Post by: burakkucat on May 14, 2020, 06:08:18 PM
how does one "right click" on an ipad?

I have used a generic term for which, I hope, there is an iDevice equivalent.
Title: Re: Saving an icon that contains an html file
Post by: Weaver on May 14, 2020, 06:44:09 PM
@burakkuat I get an err msg if I click on the icon, something about localhost. Actually to be more accurate - I can see the content of the html file itself, it opens up as expected the first time you try it. If you then close safari, there is an icon on the desktop representing the document but the second time you try to open it by clicking on it then you get the localhost something not found error message from safari
Title: Re: Saving an icon that contains an html file
Post by: chenks on May 14, 2020, 07:05:57 PM
I have used a generic term for which, I hope, there is an iDevice equivalent.

well as the ipad has no left or right click, there is no real equivalent.
Title: Re: Saving an icon that contains an html file
Post by: jelv on May 15, 2020, 11:52:53 AM
Try the Goodreader app (something I found from Googling).
Title: Re: Saving an icon that contains an html file
Post by: Weaver on May 15, 2020, 08:32:57 PM
Will do. I used to use that app on my Blackberry.