You’re not committing to a full site redesign. Instead, there are many simple checks you should be doing anyway to optimize all the weather of your site. Developing a far better understanding of how the browser pulls in and renders all of your page resources can help, too.
Simplify Your HTML
Your first step is optimizing the HTML itself. It’s a good idea to go through your basic HTML markup and confirm you’re following modern conventions. Start by making sure your code is clean, readable, and not using any unnecessary tags.
I also recommend getting on board with semantic markup: separating content from its styling and stripping the HTML down to only the required elements will help you get organized. In 2008, Chris Coyier wrote a superb primer called “12 Principles For Keeping Your Code Clean.” Most of the principles still apply.
HTML5 brings new features that enable you to reduce semantic markup even further. There’s a new, simpler doctype, and new tags like <header>, , , and that map directly to ele‐
ments of your page.
Externally referenced CSS and script files cause additional resource requests and round trips, but can be cached by the browser. Even small files incur trip costs that cause latency, whether or not bandwidth is a performance factor.
DNS lookup also causes latency, so minimize the number of different DNS lookups needed to load critical resources.
Further visits still got to request the info , though it are of ten fetched from the cache, which is faster. But remember: you only get one chance at a first impression. Make
sure that initial experience is a good one.
Remember, each file you need to load requires its own request and response (and potentially a DNS lookup as well).Don’t use the CSS @import directive as a shortcut to combine stylesheets—it doesn’t work like compiling code; the browser still needs to request both files.
If you like this post, don’t forget to share 🙂