I have an external JS file embedding some content inline in a web page.

Basically it just does a document.write("my content") via a script tag and loaded externally with the src attribute.

Any chance for this content to be indexed?

Answer seems obviously negative but I have a slight hope while crawlers have surprising abilities.

4 Answers 4


No, they won't see such content.

  • 4
    This is not strictly true. Google can index JavaScript generated content to some degree, and it is only going to get better. I manage an old site that has an incredulous amount of document.write() content and some of this is indeed indexed. However, it is certainly very hard for search engines to index and notoriously unreliable, but there is certainly a "chance".
    – MrWhite
    Sep 22, 2012 at 19:57

The noscript tag won't help much


One of the problems with noscript is - as others have mentioned - that it's been abused quite a bit by spammers, so search engines might treat it with some suspicion. So if this is really important content, then I wouldn't rely on all search engines treating your noscript elements in the same way as normal, visible, static content on your pages. If this is "just" for comments, then that might be worth considering regardless, especially if the alternatives are much more complicated


Yeah it is possible that this part can be visible in the search engines , there is a project called #! (hash bang) according to this if you have any javascript code introduced in yourpage you can surely index it in the search engines by making a anchor tag with the reference starting with a #! . try it it might help but i m not sure about your perticular problem.

  • 2
    I would agree that this JavaScript content could be indexed. However, #! (hashbang) URLs are for indexing pages that are dynamically loaded using AJAX, that would not otherwise have a canonical URL. It is not necessary for indexing arbitrary content that is rendered with JavaScript which would seem to be the case in question.
    – MrWhite
    Sep 22, 2012 at 18:31

Search engines do not parse javascript so document.write() would not be indexed by search engines. One way you might be able to get around this is by having text in noscript tags.


<noscript>Text goes here</noscript>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.