From the course: Advanced SEO: Developing an SEO-Friendly Website

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

JavaScript and the DOM

JavaScript and the DOM

From the course: Advanced SEO: Developing an SEO-Friendly Website

Start my 1-month free trial

JavaScript and the DOM

- [Instructor] As more and more websites move to using Javascript, traditional methods for inspecting the HTML become unusable, and you may have encountered this before if you've tried viewing the source on certain websites. This is because what you're seeing in view source is the code before it's processed by the browser. You see, each site has a Document Object Model, or DOM, and this is a representation of all the HTML properties by the browser. With the DOM, an HTML page can be modified at any time by your Javascript or CSS, which means there's a lot more going on behind the scenes. Now depending on how the site is developed you may see variables mixed in with the content, or you may not even see the complete structure of the site once it's fully loaded. To give you an example of this, I went ahead and viewed the source of TMZ.com's mobile site, and you'll notice that here there is a link rel="canonical" and the href tag is left blank, and that would be an SEO issue. Right, so you…

Contents