Page is a not externally linkable
- Code, Content, and Presentation
-- JavaScript and AJAX
---- document.getElementById vs document.write?


ewwatson - 9:29 pm on Nov 15, 2012 (gmt 0)


".no-js #loading { display: none; }

Then within your content, you include it:

<div id="loading">Loading...</div> "

Hey guys. Ya thats how I originally did it give or take. But then I noticed google reading my Loading... text as the first word. Dont want that. So I did this..,

In my head I have this on each page. document.documentElement.className = 'js';

At the bottom of my page I have this on each page.
document.getElementById("loading").innerHTML = "Loading...";

In my css I have #loading {display:none} html.js #loading {display:block}

Works perfect. Loads instantly - first thing on the page. Google may still parse the js but now it's at the bottom and its js so the bot dont care.


Thread source:: http://www.webmasterworld.com/javascript/4518258.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com