• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Manual Optimization

Automated optimizers can only go so far. To fully optimize web pages, you've got to do the job manually. Popular Mechanics overuses unoptimized CSS rules, absolute URLs, long filenames and directory names, and a good amount of unoptimized JavaScript (18 script elements in all). This section shows you how to take out some of this dead wood.

CSS Optimization

Let's start with the CSS. Popular Mechanics uses nearly 10K of CSS, with redundant rules aplenty. These can be optimized using shorthand properties like font and shorthand hex notation for colors. In addition, by specifying global fonts for the body (and td and th) elements, you can avoid the redundant font-family properties strewn throughout the code. So this:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint