Should a site be backwards compatible with PHP/Javascript

I know a ton of sites use AJAX a lot and I am wondering if a site only work if JavaScript is turned on, so that a backwards compatible fallback on non-js is not required. In other words, where you don’t have to have two workable versions.

Or is that bad practice? I would imagine most people have it on because of sites like Youtube and Hulu.

The only reason I wanted to know is to prevent refreshes, I’ll still keep 99% of the code in PHP for validation, etc.

I think what causes a lot of confusion, is when people use terms like “backwards compatible” and “degradation” and similar terms that suggest you have to take a step back from the original design.

The correct thing to do, is to build the site as if there were no such thing as Javascript, and then you use Javascript to go through and setup all of the Javascript features.

Think of HTML like a car stock from the factory, PHP like the robots that produce that stock HTML car on an assembly line, and Javascript as after-market parts that can be added to enhance certain aspects of the car.

A good way to practice this, is to use something like Firefoxes Greasemonkey, Google Chromes User Script, or Operas user.js to go into your favorite sites and perform your own modifications to do things like move buttons around, load more replies via AJAX, etc.

What you’re describing is not backward compatibility but graceful degradation. and it’s a good thing to have. Imagine you have a device incapable of JavaScript and want to visit a simple website to buy something, but you can’t get that done because the site relies on JavaScript too much. How would you react?