I am developing a one page website using html, css, javascript and php. I am using jQuery to handle all the navigation of the website, so when a user clicks a link in the navigation menu then the current content will fade out and the content the user chose to view will fade in.
For sake of progressive enhancement and taking into consideration users without javascript I am going to split the content out into seperate pages that I want to be displayed to the user if javascript is disabled, thus allowing users without javascript enabled to still navigate around the site without a problem.
I am relatively new to php so I am having a slight problem figuring out how to do this. Is there a php function that will return whether or not the user has javascript enabled ?
So the code would be something like:
<?php
if (!javascript) {
header('Location: home.php');
}
?>
where home.php would be the page catered to users without javascript. Or am I looking at this problem in the wrong way ?