title: Enabling Geolocation for localhost in chrome
body: <p>I am pretty new to Javascript/html5. I am basically working off code provided in Rbon Nixon's book (4th Edition, Learning PHP, MySQL and Javascript...). Example 22-2 of which is about "displaying the map at a user's location".<br>
  I am getting caught in the if part of the following code snippet:</p>
  
  <pre><code>    &lt;script&gt;
          if (typeof navigator.Geolocation=='undefined')
              alert("Geolocation not supported.")
      &lt;/script&gt;  
  </code></pre>
  
  <p>Superficially, it seems quite obvious that I should enable geolocation int eh browser for localhost. I am using chrome (Version 60.0.3112.113). But when I go to Settings >> Advanced >> Content Settings >> Location<br>
  the ask before accessing option is enabled. and then there are the Block and Allow sections. But it does not give me an option to add localhost. How do I enable it so that I can use geolocation in my code and test it on my machine?</p>