title: Why does a browser send two requests for the same page when it's refreshed?
body: <p>I've created a simple Node.js app which logs to console the current <code>request.url</code> for every incoming HTTP request. When I refresh the page in Chrome on Mac OS X ML, I receive two requests for the same page. <strong>Why?</strong></p>
  
  <p>In comparison, when I use <strong>curl</strong> and request the same page, I receive only one request. Same one request if I refresh the page in Safari.</p>
  
  <p><strong>Why would Chrome send two requests for the same page?</strong></p>
  
  <p><strong>Edit:</strong> I've looked into the <code>request.headers</code> and found one difference: the <code>accept</code> header.</p>
  
  <p>Here is the header for the first request. Notice, it <em>accepts</em> a list of specific mimes.</p>
  
  <pre><code>{ host: 'www.pulsr.local:1337',
    connection: 'keep-alive',
    'cache-control': 'max-age=0',
    accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
    'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',
    'accept-encoding': 'gzip,deflate,sdch',
    'accept-language': 'en-US,en;q=0.8',
    'accept-charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',
    cookie: 'PULSRSESSID=BBtDAWMVgbQZ8lXA6wv4Wg/vwwI=; PULSRSESSID=dsGxP494UxJueit2/u79AFiM5fw=' }
  </code></pre>
  
  <p>Here is the second request. This time it <em>accepts everything</em>.</p>
  
  <pre><code>{ host: 'www.pulsr.local:1337',
    connection: 'keep-alive',
    'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',
    accept: '*/*',
    'accept-encoding': 'gzip,deflate,sdch',
    'accept-language': 'en-US,en;q=0.8',
    'accept-charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',
    cookie: 'PULSRSESSID=VGWRSG9zIokHjA2vLa1b+/fUqu8=; PULSRSESSID=dsGxP494UxJueit2/u79AFiM5fw=' }
  </code></pre>
  
  <p><strong>Edit 2:</strong> I've checked and see that both requests are <code>GET</code> requests.</p>