Warning bar on top of HTML page?

What is the best way to create a notification bar using css, but without javascript at the top of the page, for example, with one StackOverflow that says "Qaru works best with JavaScript enabled"?

I heard that this is bad for SEO, as it duplicates the content on each page. How to prevent this?

+5
source share
4 answers

something like that:

...
<body>
<div id="jsNotify"><p>This page works best with JavaScript</p></div>
<script type="text/javascript">
  var elm = document.getElementById("jsNotify");
  elm.parentNode.removeChild(elm);
</script>
...

This will add a notification at the top of the page, but will delete it if you have JavaScript enabled.

, . , nofollow, :

<a href="http://www.example.com/" rel="nofollow">limited site</a>
+3

, , , JavaScript, noscript.

<noscript>Please enable JavaScript.</noscript>
+6

SEO, , .

+3

, , , . - , .

+1

All Articles