Skip to content

Instantly share code, notes, and snippets.

@calexandrepcjr
Created June 8, 2017 18:02
Show Gist options
  • Save calexandrepcjr/94f16c1eeff89561de4bd8e514a4fa80 to your computer and use it in GitHub Desktop.
Save calexandrepcjr/94f16c1eeff89561de4bd8e514a4fa80 to your computer and use it in GitHub Desktop.
The simplest way to validate if javascript's browser is enabled. Put into the head of your page.
<noscript>
<style type="text/css">
body {
display: none;
}
html:after {
text-align: center;
display: block;
font-size: 5rem;
color: #FF0000;
content: "Enable your javascript to use this site";
}
</style>
</noscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment