my site is completely based on Ajax requests and simple navigation within the site is done from only one single page. This means when users click the menu items it doesn't load another page rather it loads the content inside an HTML element. But when a user wants to link a page to their friend it will always be the same because http://mysite.com/mymainpage.php will always be the same regardless of what ajax pulls up. How can I modify the users header? For instance when they click on "games" can jquery/js/php/html change the current URL address bar on the browser? so that it becomes http://mysite.com/mymainpage.php?games=true. Then the user can just copy the sites url from the address bar and it will lead to the correct section for ajax to load up.
You can use hashes:
You can read the hash using
window.location.hash /* gives "#games" */
window.location.hash.substring(1) /* gives "games" */
And you can change it using
(it seems it works but better use the first option)
Then, each time user clicks a link, change the hash and load the new page like you do now.
And when the user enters to your page, check if there is a hash in the URL and load that page.
You could also add a hashchange event listener. See https://developer.mozilla.org/en-US/docs/Mozilla_event_reference/hashchange
No, you can't have two hashes ( http://mysite.com/mymainpage.php#games#fashion )
And then you can change it to http://mysite.com/mymainpage.php#fashion without reloading.