title: How Does Website Access Control Actually Work?
body: <p>I am just starting to learn about web development and something has been niggling me for a while now, How a website controls what you can access and cannot access.</p>
  
  <p>For example, a website like Facebook. When i first go to the site, it presents a login form, once i am logged the same page that i tried to access before now shows information relevant to me that i could only access once logged in, i can navigate to a different site and then comeback to google and it still allows me to use if without logging on again. </p>
  
  <p>How exactly would a site block someone trying to access a particular page when they are not logged in, lets say the page <code>viewProfile.php</code>. How does the website know who to allow access to this page?</p>
  
  <p>I realise this question may seem confusing and elementary but its just a something that came to me whilst viewing facebook.</p>
  
  <p>Thanks.</p>