Javascript detection

I’m looking for a method to detect if a browser has javascript enabled and if no, then return an alternative page back stating that javascript needs to be enabled.

I don’t think there is a way to ask a browser if he has JavaScript enabled/disabled as this would need the browser to send back data about its configuration to the server.

But you can handle that situation with the html tag.