Watching:

How to Clear Source Code Clutter for Optimization


show more Clearing source code clutter provides you with in-depth training on Web. Taught by Peter Kent as part of the Analyzing Your Website to Improve SEO show less
please wait ...

Clearing source code clutter

People who've been in the SEO business a long time tend to prefer clean, uncluttered source code. The idea is that you make it as easy as possible for the search engines to get to the important keyworded, indexable content by reducing unnecessary code in your pages. To be honest, I'm not sure how much it matters these days-- probably less than it used to a few years ago. But nonetheless, uncluttering your code is not a bad thing to do, and in any case, there are other benefits, such as reducing the time it takes your pages to load in a browser.

There are three main areas to look for: style sheets, JavaScript, and image maps. I often find huge areas of Cascading Style Sheet code embedded into web pages. The funny thing is, to some degree, that's defeating the purpose of style sheets. After all, one of the original purposes is to separate content from presentation, to allow, for instance, the formatting of multiple pages, an entire site for instance, to be defined once. Dropping the style sheet into the top of each document over and over again is counterproductive.

In any case, this CSS information can often be removed from the web page and referenced in an external document. This reduces the clutter, but it also speeds up page load, because rather than loading the style sheet code every time a page loads, the style sheet file is loaded just once. You can also remove JavaScript and reference it, and again, you will get the same advantages. You'll remove clutter from your code, and the pages will load faster, because that code only has to load once. For instance, you may have a JavaScript-based menu system.

Remove the code and now that only loads once, instead of every time a page loads. How about image maps? If you have complicated images, the image map code can take up a lot of room. Unfortunately though, few browsers support external image maps, so you can't save it in a separate file. You can, however, move the map tag that contains all the coordinate information to the bottom of the web page, moving it after all your page content. Cleaning up the clutter may help search engines index your pages more efficiently, and speeds up your site, so spend a few minutes cleaning your code.

Clearing source code clutter
Video duration: 2m 19s 1h 47m Intermediate Updated Sep 09, 2015

Viewers:

Clearing source code clutter provides you with in-depth training on Web. Taught by Peter Kent as part of the Analyzing Your Website to Improve SEO

Subjects:
Web Marketing
Author:
please wait ...