feat(aio): dynamically, pre-emptively, add `noindex` (#21992)
These tags are removed when the doc is ready and valid, but this will
allow us to block indexing in the case that the Angular app fails to
bootstrap or load the document for some non-404 reason.
This should get around the problem with hardcoded tags. See
c3fb820473
Closes #21941
PR Close #21992
This commit is contained in:
parent
3a86940ca5
commit
5a624fa1be
|
@ -31,6 +31,14 @@
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
<meta name="apple-mobile-web-app-status-bar-style" content="translucent">
|
<meta name="apple-mobile-web-app-status-bar-style" content="translucent">
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// Dynamically, pre-emptively, add `noindex`, which will be removed when the doc is ready and valid
|
||||||
|
var tag = document.createElement('meta'); tag.name = 'googlebot'; tag.content = 'noindex';
|
||||||
|
document.head.appendChild(tag);
|
||||||
|
tag = document.createElement('meta'); tag.name = 'robots'; tag.content = 'noindex';
|
||||||
|
document.head.appendChild(tag);
|
||||||
|
</script>
|
||||||
|
|
||||||
<!-- Google Analytics -->
|
<!-- Google Analytics -->
|
||||||
<script>
|
<script>
|
||||||
// Note this is a customised version of the GA tracking snippet
|
// Note this is a customised version of the GA tracking snippet
|
||||||
|
|
Loading…
Reference in New Issue