I currently have something like this
<p class="test"></p>
<script type="text/javascript">
$(document).ready(function() {
$(".test").html("hey");
});
</script>
Will search engines be able to spider the “hey” text? and if yes, what method can I use to prevent that.
Despite what is being stated here in other answers and totally contrary to Google’s own FAQ, a Google employee named JohnMu answered a question recently in Google Groups about how the GoogleBot came to follow a non-existent URL. (The actual URL was contained within the jQuery code itself and the GoogleBot DID try to follow it.)
jQuery causing 404 errors in Google Webmaster Tools
Google Employee explains how JavaScript and jQuery are indexed
Apparently, Google does attempt to index your JavaScript.
Quote Google’s JohnMu:
JohnMu later in the same thread…