Further to my comment above, you may wish to investigate the <noscript> tag. This tag's contents will only be rendered if the user's browser doesn't have a JavaScript capability - either because it lacks the functionality, or because the user has turned it off.
The ability to turn-off JavaScript isn't going away any time soon, as for a number of reasons, some people will only ever use the net with it disabled.
The correct approach to take in this instance is to present a message informing the user of the site's dependence on it, along with a suggestion to enable it.
Here's a sample page that presents differently with JS on/off.
Note, that I didn't have to remove the <noscript> tag from the page.
<!DOCTYPE html>
<html>
<head>
<script>
function byId(e){return document.getElementById(e);}
function newEl(tag){return document.createElement(tag);}
function newTxt(txt){return document.createTextNode(txt);}
window.addEventListener('load', mInit, false);
function mInit()
{
var canvas = newEl('canvas');
canvas.width = canvas.height = 256;
var hdc = canvas.getContext('2d');
var x, y, curCol;
for (y=0; y<canvas.height; y++)
{
for (x=0; x<canvas.width; x++)
{
curCol = 'rgb(' + (x^y) + ',0,0);';
hdc.fillStyle = curCol;
hdc.fillRect(x,y,1,1);
}
}
var base64ImgStr =
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABzklEQVQ4T1WTu1I"
+"DMRRDr3dtr19UUJEqNFClSZMCZmBgQvL/H2QkeZdAccd5SXuk6zgz6957S0uyJUWLONOCMy4WQ7QQvQUfzAcM"
+"fjdNk83zbM45mzAOH/acIMIsnGX5HRksQQYBBhTOHjPNMHJ49mSu1dZzHgYpZ4n5Ov5SBNDASBQQz4OCQwp3f"
+"/8gg5wyDIhPElKQhpEYZRB4moDgbwy3e9z1XEiQLYOAFIkGcYvDPjCI49GHBwGjiAAx3P5p30suIABFKaIgjQ"
+"hglCgmBWOsRcqAwwgvL88ySJhSbhSZZW6R/hmsXagDbONwOKADim8GjKI47EV9cEhAknUbIoDJ8XjstSJCrlZ"
+"qNtIokvoY3dCEM2KgC5XJTYDgdDr1UqtVEdyGfRSKUbA2xBjohQQBRn4r8u3ttZfCp9NkUPDM6EOGijNKZrGR"
+"JLiRupVYqXt//+itlVUMExhJyBNivlcnMOQd0SVbN8JNuK+vT3TQIKrWGg1ghveKRBOSyYC9cNYLhi5mULjz+"
+"SwDiWFSZTKmbQYbFSOul46bCTT4vlz6nQR4KsSDAq9pCprSeK796CFj3dwOo7jL9drxh5Lwr5hmd4xGEgr5vY"
+ "xvhCz2B4Y9LU8XKxijAAAAAElFTkSuQmCC";
document.body.style.backgroundImage = "url(" + base64ImgStr + ")";
document.body.style.textAlign = 'center';
var myHeading = newEl('span');
myHeading.appendChild( newTxt('Welcome to my JavaScript-only page') );
myHeading.style.backgroundColor = 'rgba(255,255,255,0.6)';
myHeading.style.fontSize = '2em';
document.body.appendChild(myHeading);
document.body.appendChild( newEl('br') );
canvas.style.boxShadow = '0 10px 20px black';
canvas.style.padding = '10px';
canvas.style.backgroundColor = 'blue';
document.body.appendChild(canvas);
}
</script>
<style>
</style>
</head>
<body>
<noscript>This page depends on JavaScript. Enable Javascript then reload this page</noscript>
</body>
</html>