2

I saved a web application to my home screen, but the icon on the home screen opens a different URL. Somehow the URL of the bookmark that was saved to the home screen does not match the URL that was in the address bar.

Steps to reproduce

  1. On an any iOS device... (I used an iPhone XR)
  2. Browse to https://bc.thrive.health/covid19app/home
  3. Press the Share button
  4. Choose "Add to Home Screen"
  5. Notice that the URL in the pop-up prompt https://bc.thrive.health is different from the URL in the address bar.

What causes this? How does iOS determine what URL will be used when adding to the home screen, and in what circumstances can it be different from the URL in the address bar?

  • 1
  • @ankii Yes, it looks like my question is a duplicate of that one. But I can't close this question while it has an open bounty. Also the link doesn't quite answer my case because I'm not using <link rel="canonical"> – Nic Apr 8 at 18:26
1
+50

The way that iOS apps save/install to the homescreen is by checking something called the manifest. (see more)

The URL being referenced in the manifest.json at the specified URL is pointing to "/" meaning the root of the site which means it is working as expected. enter image description here

There are two options to resolving it

  1. Change the start_URL to match your destination i.e. "/covid19app/home" instead of "/"

  2. Look into options to creating a relative URL per page based on the header URL if needed for multiple pages.

Your manifest.json file is located in the root directory. Alternately you can find resources to creating one for a web app.

| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .