Search code examples
htmliphonemobile-safarifavorites

How to have a custom URL for an icon on the iOS home screen


Is it possible to make a custom URL for an icon on the iOS home screen? Or at least have a way for the user to edit the URL themselves?

UPDATE: To be more specific, here's what the client said:

"Because of our use of authentication, the URL of the landing page that [website] takes you to changes to a long URL with a session ID. Right now, when I use the Add to Home Screen function, it associates the icon with the long URL which, because of the session ID, won't work after a couple of days. Is there any way to change the URL to [website] (our stable and persistent URL) after or before the Add to home screen function is invoked"

Also, the website isn't a web app, so I'm not sure if web app things would apply here.....?


Solution

  • This answer is no longer valid.


    No, it's not possible to do this because of security constraints. You need to handle those expired session IDs on the web application side - it's usually done with a redirect to the authentication page, most web frameworks should do this out of the box for you.

    Related: Can the url for the "Add to home screen" on iPhone Safari be customized?