Using MYTHEME_page_attachment_alter does not alter the favicon Based on other similar stackexchange questions and documentation, I've implemented the following in the MYTHEME_page_attachment_alter function in MYTHEME.theme file to change the favicon based on the url (inside a condition statement):

    foreach($page['#attached']['html_head_link'] as $k =&gt; $v) {
        if (array_key_exists('rel', $v[0]) &amp;&amp; $v[0]['rel'] == 'shortcut icon') {
            unset($page['#attached']['html_head_link'][$k]);
            $page['#attached']['html_head_link'][$k] = array(
                array(
                  'rel' =&gt; 'shortcut icon',
                  'href' =&gt; '/themes/fu/favicon_urbana.png',
                    'type' =&gt; 'image/png',
                ),
            );
        }
    }


Using Kint::dump($page) confirms that the shortcut icon is indeed updated.  Why then will the tab for the page not show the updated favicon?  I've cleared the cache, ran drush cr multiple times, etc yet the page continues to show the theme's favicon.  

Am I missing something?  Any advice would be greatly appreciated.  

On a side note, we had this working successfully in Drupal 7 in MYTHEME_html_head_alter() and I am migrating this to Drupal 8.
If its not a browser cache issue perhaps you should try modifying it with a hook called later namely THEMENAME_preprocess_html

function THEMENAME_preprocess_html(array &amp;$variables) {
  $test = "";
  $variables["page"]["#attached"]["html_head_link"][0][0] =
    array(
      'rel' =&gt; 'shortcut icon',
      'href' =&gt; '/themes/fu/favicon_urbana.png',
      'type' =&gt; 'image/png',
    );
}