title: Favicon missing in headless puppeteer
body: <p>I'm writing a simple script to just check if all the resources load correctly (i check status codes of the responses). I've decided to use puppeteer for this and i wrote</p>
  
  <pre><code>(async () =&gt; {
      const browser = await puppeteer.launch({headless: false});
      const [page] = await browser.pages();
      page.on("response", (res) =&gt; {
          const url = res.url(), status=res.status();
          // my functionality goes here
          if (url.includes("favicon")) console.log(status, url); // not logging in headless
      });
      await page.goto("https://stackoverflow.com/", {waitUntil: 'networkidle2'});
      await browser.close();
  })();
  </code></pre>
  
  <p>the issue is that if i run my application in headless mode the favicon is missing from the responses, i assume it has something to do with puppeteer not loading a favicon in headless. Any built in functionality or workarounds?</p>
  
  <p>From the lack of a better solution right now I'm evaluating favicons url and manually visiting it</p>
  
  <pre><code>async function checkFavicon(page){
      const iconUrl = await page.$eval("link[rel*='icon']", ({href}) =&gt; href);
      await page.goto(iconUrl);
      await page.goBack();
  }
  </code></pre>