3

I'm using Chrome and Firefox on Android 10. I need to add a link to my home screen and I can't find a way to add the specific link.

I know that I can do the following:

  1. Go to the URL
  2. Tap the overflow (3-dot) menu
  3. Add to home screen

However, if I navigate to a specific URL within some sites, like Weather Underground (https://www.wunderground.com/) and follow the above process, it doesn't add the specific URL, it adds www.wunderground.com and doesn't seem to give me any way to edit that URL to reference the specific subpage (e.g. www.wunderground.com/my/specific/url).

Why, and how to solve this?

  • Have you tried to use a special app like Shortcut To URL to create the shortcut? – Robert May 14 at 12:01
  • I am still having this issue despite @beeshyams fix. Attaching Wikipedia - Mithridatism to my home screen instead creates a link to the home page of the mobile Wikipedia. Meanwhile, I've found forcing the desktop view of the page, then attaching to home screen works, linking to the correct desktop subpage. (Chrome 83.0.4103.106 on Android 10 on a Nokia 7.2 device) – D-zap Jul 5 at 17:39
  • @D-zap I requested Andrew (who posted answer) to check my solution and he reverted that it didn't work for him too. Hence, deleted my answer// Why it worked for me is still a mystery but that's another question – beeshyams Jul 6 at 15:58
3
+50

tl;dr

Using the browsers' "Add to Home Screen" (A2HS) feature may not open the expected link due to the browsers trying to comply with the standard of Progressive Web Application (PWA). Try other approaches instead, like using app widgets or 3rd-party apps altogether (examples below).

Progressive Web Application (PWA), Manifest file, and Add to Home Screen (A2HS)

To put it simply, PWA is an advanced web app that follows some rules. One of them is having a manifest file.

In order to call a Web App a PWA, technically speaking it should have the following features: Secure contexts (HTTPS), one or more Service Workers, and a manifest file.

A2HS is a browser feature to "install" a web app based on the configuration in the manifest file, which is linked on the header tag.

<head>
   ...
   <link rel="manifest" href="link_to_manifest_file">
   ...
</head>

One of the required fields in the manifest file is start_url that will be loaded when opening the "app".

The start_url member is a string that represents the start URL of the web application — the prefered URL that should be loaded when the user launches the web application (e.g., when the user taps on the web application's icon from a device's application menu or homescreen).

If start_url is invalid, it may return the document URL instead (i.e. the exact URL when the page is added to the home screen). However, since the manifest file is configured by the web developer, it might be difficult for end-users to modify/override this value.

In short, when a user adds a web page to the home screen, the browser will check if there is a manifest file, and if there is, it will try to use its value.

Some examples...

  • Wikimedia (including Wikipedia, Gamepedia, and possibly other wikis) has a mobile front-end extension that will only add the manifest file to the mobile view with start_url always pointing to the Main Page.

    The manifest file:

    <link rel="manifest" href="/w/api.php?action=webapp-manifest">

    The content of the manifest file:

    {"name":"Wikipedia","orientation":"portrait","dir":"ltr","lang":"en","display":"browser","theme_color":"#eaecf0","background_color":"#fff","start_url":"/wiki/Main_Page","icons":[{"src":"/static/apple-touch/wikipedia.png","sizes":"160x160","type":"image/png"}]}
    

    This is why adding the desktop version works (and depending on the browser's configuration, it will redirect to the mobile view automatically), but adding the mobile view always returns to the Main Page instead.

  • Weather Underground always sets the manifest file regardless if it is viewed on desktop or mobile.

    The manifest file:

    <link rel="manifest" href="bundle-next/manifest.webmanifest">

    Containing "start_url": "/", which is basically the domain itself.

Solutions and/or workarounds

  • Some sites only have a manifest file on mobile view, using desktop mode may mitigate this issue

  • Some apps may allow opening an exact URL. Tasker has "Browse URL" task and users can also add an app widget on the home screen as a shortcut to that task

  • Some 3rd-party apps can create a home screen shortcut to a URL

  • Changing user agent may work (e.g. by using XPrivacyLua as mentioned by user beeshyams in the chat room). According to the documentation,

    Note: The start_url member is purely advisory, and a user agent may ignore it or allow the user to alter it at install time or afterwards.

  • (Idea, untested) strip the <link rel="manifest" href="link_to_manifest_file"> tag (e.g. using "ad" blockers) from the HTML when the page is loaded.

| improve this answer | |
  • Is this behavior intentional on the part of the website, or is this badly implemented PWA standards? – D-zap Jul 8 at 9:35
  • @D-zap It's hard to answer that without knowing the web devs' intent. On one hand, start_url is actually optional for PWA; emptying it will just return the document URL instead. On the other hand, AH2S seems requiring it. – Andrew T. Jul 8 at 9:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.