| You are here: | About>Computing & Technology>Web Design / HTML> Testing Your Web Pages> Web Site Optimization> Avoid Unnecessary White Space in Your HTML to Speed Up Your Pages |
![]() | Web Design / HTML |
Editing Web Sites / Managing Web SitesFind the Right Web Page EditorSearch Engine Optimization Step-by-StepWeb Site Analytics White Space in HTML Can Slow Your PagesBut I'm not Advocating Removing it AllOptimizing Pages is More Than Just GraphicsWe all know that creating a Web page means that you need to create a page that downloads quickly. If someone is viewing your site on a slower connection, and it takes too long to load, they might just give up and go somewhere else. But what if you've optimized all your images, externalized all your CSS and JavaScript, and done your best to create a lean, mean Web site and the page is still slow to load? Take a look at your HTML. It may look something like this: ... Or like this: ... Chances are, your pages take longer to download than they should. Tips to Removing White Space from HTML
Be Wary of "Optimizers"There are tools available that will sweep your code and remove extra characters including white space. If you're going to use these, be sure to validate that they are leaving your code correct. Some optimizers remove attributes that are required for valid, standards-based XHTML. Others remove so much white space that only the computer can read the pages when they're done. That said, one of my favorite tools is the HomeSite "Code Sweeper". I like the code sweeper because I can customize it exactly how I want it. So I know it won't be ripping out attributes I want in or adding spaces I don't want. You can do the same in Dreamweaver with Source Formatting, but it's less flexible. Editing Web Sites / Managing Web SitesFind the Right Web Page EditorSearch Engine Optimization Step-by-StepWeb Site Analytics |
Las Vegas on a BudgetFind a BargainHotel DealsCheap EatsFree AttractionsEntertainment for Less |
All Topics | Email Article | | | ![]() |
| Advertising Info | News & Events | Work at About | SiteMap | Reprints | Help | Our Story | Be a Guide |
| User Agreement | Ethics Policy | Patent Info. | Privacy Policy | ©2008 About, Inc., A part of The New York Times Company. All rights reserved. |


