Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
   Glossary   Glossary
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Author Topic: Saving an icon that contains an html file  (Read 2540 times)

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Saving an icon that contains an html file
« 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?
Logged

chenks

  • Kitizen
  • ****
  • Posts: 1106
Re: Saving an icon that contains an html file
« Reply #1 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)?
Logged

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Re: Saving an icon that contains an html file
« Reply #2 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.
Logged

chenks

  • Kitizen
  • ****
  • Posts: 1106
Re: Saving an icon that contains an html file
« Reply #3 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">
« Last Edit: May 14, 2020, 11:07:33 AM by chenks »
Logged

jelv

  • Helpful
  • Kitizen
  • *
  • Posts: 2054
Re: Saving an icon that contains an html file
« Reply #4 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.
Logged
Broadband and Line rental: Zen Unlimited Fibre 2, Mobile: Vodaphone
Router: Fritz!Box 7530

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Re: Saving an icon that contains an html file
« Reply #5 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
Logged

burakkucat

  • Respected
  • Senior Kitizen
  • *
  • Posts: 38300
  • Over the Rainbow Bridge
    • The ELRepo Project
Re: Saving an icon that contains an html file
« Reply #6 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?
Logged
:cat:  100% Linux and, previously, Unix. Co-founder of the ELRepo Project.

Please consider making a donation to support the running of this site.

chenks

  • Kitizen
  • ****
  • Posts: 1106
Re: Saving an icon that contains an html file
« Reply #7 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?
Logged

burakkucat

  • Respected
  • Senior Kitizen
  • *
  • Posts: 38300
  • Over the Rainbow Bridge
    • The ELRepo Project
Re: Saving an icon that contains an html file
« Reply #8 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.
Logged
:cat:  100% Linux and, previously, Unix. Co-founder of the ELRepo Project.

Please consider making a donation to support the running of this site.

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Re: Saving an icon that contains an html file
« Reply #9 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
« Last Edit: May 14, 2020, 06:51:31 PM by Weaver »
Logged

chenks

  • Kitizen
  • ****
  • Posts: 1106
Re: Saving an icon that contains an html file
« Reply #10 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.
Logged

jelv

  • Helpful
  • Kitizen
  • *
  • Posts: 2054
Re: Saving an icon that contains an html file
« Reply #11 on: May 15, 2020, 11:52:53 AM »

Try the Goodreader app (something I found from Googling).
Logged
Broadband and Line rental: Zen Unlimited Fibre 2, Mobile: Vodaphone
Router: Fritz!Box 7530

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Re: Saving an icon that contains an html file
« Reply #12 on: May 15, 2020, 08:32:57 PM »

Will do. I used to use that app on my Blackberry.
Logged