A redirect might make a URL such as http://treefrogs.com into http://www.treefrogs.com or http://treefrogs.com/ (simply adding the forward slash). Redirects slow down web sites, so remove any redirects that are not required.
It’s true that the average web site’s size has surpassed 1MB. But it is also true that most web sites are excruciatingly slow and unusable on mobile — mobile being the future of web browsing.
Be among the best. Keep your pages smaller than 500K.
They are harmless, but if you’d like to reduce and clean up your code a bit, you can remove XHTML close tags (” />”) from elements.
We recommend that CSS files larger than 5K have whitespace removed. Search “minify CSS.”
Font files can be very large — commonly 1MB. If your custom font does not compress well, and you do not use it much on your site, you might decide it’s not worth slowing down your page. For example, if you use a bold version of a font in only one place, consider if the cost of loading it is worth it.
Some external services can help with managing font file size sizes, and may possibly serve cached fonts. Two to consider are Google Web Fonts and Typekit.
It is not a good idea to load a custom font to make your logo — it is much more efficient to use a graphic instead. Also, you can’t really control how or if a web font is displayed.
To benefit from common scripts cached by browsers, you should use the Google Library APIs whenever possible. As an example, over 85% of sites use JQuery, and this 20K-ish script does not need to be re-downloaded for every single site.
However, always have a local fallback when linking external scripts that may be included locally.
You don’t want users staring at a white screen. Confirm that Start Render time is within 2.01 seconds. (Please remind me to justify this number I am now offering as a rule of thumb with no explanation.)
WebPageTest.org can tell you Start Render time as well as a lot of other useful information. Waterfall charts — which WebPageTest.org will generate for you — indicate Start Render time as a first vertical line, usually blue.
If Start Render time is greater than two seconds, you will need to optimize.
Height and width are not officially required attributes for <img>. However, including them guarantees faster content download. That information also helps the browser determine the viewport space for the image, making page rendering visually smoother.
That is, don’t create graphics of text that your users will read.
Images make pages slow; by using them you are adding http requests and files that need to be downloaded. Avoid using graphics for menu list items, for example.
Logos that include text are the exception to this rule because the rendering of a logo needs to be precise for branding. The FrontendTest logo is a graphic, for example.