Website Performance Optimization: Tutorial and Course - Website Performance Optimization Tutorial and Website Performance Optimization Course, The Ultimate Guide to Website Performance Optimization. Learn Website Performance Optimization Tutorial and Website Performance Optimization Course at Website Performance Optimization Tutorial and Course.
Website Performance Optimization Tutorial and Course - Website Performance Optimization tutorial and Website Performance Optimization course, the ultimate guide to Website Performance Optimization, including facts and information about Website Performance Optimization. Website Performance Optimization Tutorial and Course is one of the ultimate SEO Tutorials and Courses created by SEO University to help you learn and understand Website Performance Optimization and the related SEO technologies, as well as facts and information about Website Performance Optimization.
Website performance optimization streamlines your content to maximize display speed. Fast display speed is the key to success with your website. Website performance optimization increases profits, decreases costs, and improves customer satisfaction, as well as improving your website's search engine rankings, accessibility, and maintainability.
Streamlining transforms your pages to display navigable content faster, and to defer or delay off-site content. In this Tutorial and Course for Website Performance Optimization, you'll learn how to reduce HTTP requests, convert to semantic markup to more easily style with Cascading Style Sheets (CSS) (CSS Optimization), optimize graphics and multimedia, and defer or delay the loading of off-site content.
Using the best practices In this Tutorial and Course for Website Performance Optimization, you'll transform your HTML and multimedia to give your site more hurtle and less turtle. First, let's explore some common web page problems and trends that confront web performance engineers.
People don't like to wait, especially online. If a web page takes too long to load, visitors simply leave and often don't come back. 'Slow' is the biggest frustration on the web. Load time is directly related to the financial performance of the website.
Studies show that users leave a site if it hasn't loaded in 4 seconds; keep your users happy and engaged by providing a fast performing website!
Amazon noticed a 1% drop in sales for every 0.1 second the site loaded slower. In an AB test, Google raised the number of search results per page from 10 to 30. Load time went up from 0.5 to 0.9 seconds average. The number of search results and ad revenues dropped 20%!
Google has announced that they are using page speed in their ranking algorithm, as their philosophy says: "Fast is better than slow."
80% of web page response time is in the content. Most of this time is spent dealing with the objects that make up a web page. As the number of objects per page increases beyond four, object overhead dominates total web page delay.
Most popular web pages go well past this threshold, averaging more than 50 objects per page and more than 300 KB in total file size. Improperly coded, Ajax-enhanced pages can slow down interactivity, even after the page has loaded.
Clearly, there is much room for improvement in the performance of the average website.
With the advent of Ajax, DHTML, and Web 2.0 mashups, some web pages have turned from simple HTML documents into full-blown interactive applications. With this increased complexity comes a cost: larger web pages. The number of external objects has grown accordingly as web pages have become more complex. Each additional object adds one more HTTP request and more uncertain delay.
Each object adds latency to your load time, increasing it an average of 0.25 seconds per object on dial-up and 40 ms on cable. Overseas users suffer the most from object overage because long-distance connections require more hops and present more opportunities for data loss.
Tables are a poor substitute for CSS layout. Despite the widespread adoption of CSS, 62.6% of web pages still use tables for layout. The average table depth has decreased by half since 2006, from nearly 3 to about 1.5. Complex nested tables can cause rendering delays with browsers because tangled tables must be parsed and rendered before your content displays.
Some database-driven sites create table-based content modules that are assembled on the fly into table-based templates. All of these nested tables will bog down browsers and overwhelm your content-to-code ratio. This reduces the potential search engine rankings of your web pages.
You can reduce the depth of nested tables by styling, labeling, and positioning content areas with CSS and using simpler skeleton tables for layout.
The average web page has more than 54% of its page weight in graphics. In fact, more than 60% of the pixels above the fold are used by graphics on the average web page. Unfortunately, many of the graphics on the Web are fat and unoptimized. As digital camera resolution has increased, the file size of digital originals has ballooned, and some online graphics exceed 1 MB.
The popularity of Flash and the likes of YouTube, Yahoo! Video, and MySpace have increased the use of multimedia on the Web. As broadband penetration has increased, videos have grown in size, bit rate, and duration.
The majority of multimedia traffic comes from files that are larger than 1 MB, but most requests come from files smaller than 1 MB. More than 87% of all streaming media is abandoned by users in the first 10 seconds, however, wasting up to 20% of server bandwidth. Although only 3% of server responses are for videos, they account for 98.6% of the bytes transferred. So, although videos account for a small percentage of requests, they make up the majority of the traffic on the Web.
Overall, for videos longer than 30 seconds, about 13% of home and 40% of business users experience quality degradation with their streaming media, caused by rebuffering, stream switching, and video cancellation. For sessions longer than 300 seconds, the results are even worse.
To optimize your web page speed, start by stripping out all inline style. Pare down your markup to pure HTML structure. Next, look at your page to see whether any elements can be created by more efficient means. You can often morph HTML structural elements with CSS to replicate table-based elements more efficiently.
HTML5 supports a number of new semantic elements, as well as several related technologies and APIs. These additions and changes to the language have been introduced with the goal of allowing developers to build web pages that are easier to code, use, and access.
These new semantic elements, along with other standards such as WAI-ARIA and Microdata, help to make our documents more accessible to both humans and machines, as well as resulting in benefits for both accessibility and search engine optimization.
The semantic elements, in particular, have been designed with the dynamic Web in mind, with a particular focus on making pages more accessible and modular.
Finally, the APIs associated with HTML5 help improve on a number of techniques that web developers have been using for years. Many common tasks are now simplified, putting more power in developers’ hands. Furthermore, the introduction of HTML5 audio and video means that there will be less dependence on third-party software and plugins when publishing rich media content on the Web.
Overall, there are good reasons to start looking into HTML5's new features and APIs, and we'll discuss more of those reasons as we go through the Tutorial and Course for HTML5.
CSS3 contains just about everything that's included in CSS2.1, the previous version of the spec. It also adds new features to help developers solve a number of presentation-related problems without resorting to scripting plugins or extra images.
New features in CSS3 include support for additional selectors, drop shadows, rounded corners, updated layout features, animation, transparency, and much more.
In the past, in order to create gradients, shadows, and rounded corners, web designers have had to resort to a number of tricky techniques. Sometimes extra HTML elements were required. In cases where the HTML is kept fairly clean, scripting hacks were required. In the case of gradients, the use of extra images was inevitable. We put up with these workarounds, because there was no other way of accomplishing those designs. CSS3 allows you to include these and other design elements in a forward-thinking manner that leads to so many benefits: cleaner markup, maintainable code, fewer extraneous images, and faster-loading pages.
Overall, there are good reasons to start looking into CSS3, and we'll discuss more of those reasons as we go through the Tutorial and Course for CSS3.
Each unique object in a web page requires a round trip to the server, that is, an HTTP request and a reply. Each object introduces indeterminate delays. When the number of objects is greater than four, object overhead dominates page download times.
By minimizing the number of objects in your web pages, you can minimize the number of HTTP requests that are required to render your page and thus reduce object overhead. By requiring fewer HTTP requests, you'll speed up load times and make them more consistent.
Graphical text is often used for headers or menu items to achieve a certain look. As yet, search engines can't read text embedded in graphics. Rasterized text also introduces unnecessary HTTP requests. You can instead use CSS to style headers, or use an image replacement scheme. By converting to CSS text, you lose some control but gain in speed, potential search engine rankings, and accessibility.
Use text overlays. One variation on this theme is to separate graphical text from background images. To achieve high-quality text in a JPEG you need to increase the quality of the entire image so that it is higher than it needs to be, or use regional compression. In some cases, it may be more efficient to remove the text from the JPEG and overlay the text as either CSS text or, as a last resort, a transparent GIF or PNG with the text embedded in the image. With a graphical text overlay you trade an additional HTTP request for a smaller background image. A CSS text overlay avoids this trade-off.
A common practice is to use spacer cells with a single-pixel GIF that is stretched to enforce the spacing distance. But a better way would be to use CSS to add spacing between cells, and even better is to use relative "em" spacing to allow for changes in font size made by the user and div elements.
You can reduce the number of HTTP requests that your pages require by combining adjacent images into one composite image and mapping any links using an image map. Instead of multiple HTTP requests, this technique requires only one.
Many developers create separate stylesheets and import them into their pages as needed. There are two problems with this approach:
Combining files in the head of your HTML documents can avoid these problems. Browsers must load and parse external CSS files referenced within the head of your HTML before they parse the body content. By minimizing the HTTP request load, you can maximize the initial display speed of your content.
Many sites use full-size unoptimized or partially optimized JPEGs resized into small thumbnails with height and width dimensions. These files can be more than 1 MB in size, that is around a hundred times larger than these files need to be.
A better way is to crop and resize your images to the final dimensions that you want them to assume on your page. Then optimize them in a good-quality graphics program such as Photoshop or Fireworks. You can achieve higher compression ratios using specialized graphics tools. The idea is to reduce the image to the lowest acceptable quality and resolution for the Web (72 dpi).
You can often switch formats to save even more bytes. For example, you can often substitute PNG-8s used with or without dithering for JPEGs or GIFs at smaller file sizes.
TIFFs, BMPs, and maximum-quality JPEGs are unsuitable for the Web. Switching to a different format can make a significant difference in file size. The PNG is smaller than the GIF at equivalent settings. For most flat-color images PNGs are 10% to 30% smaller than GIFs due to PNG's superior compression algorithm.
Here is a summary of the techniques you can use to fully optimize your images:
Multimedia makes up only a small portion of server requests but accounts for the majority of traffic on the Internet. So, the optimization of streaming media has become more important in maximizing web page speed and reducing bandwidth usage.
Movies optimized for the Web should be short in duration, small in dimension, and optimized with the appropriate codec. We have seen videos 10 to 30 minutes long automatically loaded and playing into home pages, some 50 MB to 175 MB in file size. Although this may grab the attention of high-bandwidth users, it is better to respect your visitors' bandwidth and provide a static placeholder image and a play button. A best practice is to allow users to choose different size movies to better match their bandwidth abilities. Sizes from "small" (320×240 pixels) to "HD" (1,920×1,080 pixels) can be viewed. Overall, this was a lot of up-front work; it had to compress one movie many different times, into many different sizes. However, the extra work pays off with satisfied site visitors who are able to find content that meets their needs and the amount of bandwidth available to them. For more information about Video optimization, please visit Tutorial and Course for Video Optimization created by SEO University.
Some typical problems we see with Flash are unoptimized images and too many frames instead of tweened symbols. A tween is the calculation of all the changes between frames, which is more efficient than having a lot of frames instead. You can significantly reduce the file size of Flash movies by optimizing your images in Photoshop, not in Flash. Reduce the number of frames, minimize the number of fonts, and tween between symbols. For more information about Flash optimization, please visit Tutorial and Course for Flash Optimization created by SEO University.
You can use CSS to control drop-down menus and rollovers with the :hover pseudoclass, for more information, please visit CSS Optimization.
ie.js operamac.js opera.js ...
It is faster to set environment variables at the server by configuring your httpd.conf file using BrowserMatchNoCase . For example:
BrowserMatchNoCase "MSIE [4-11]" isIE BrowserMatchNoCase Mac isMAC BrowserMatchNoCase Opera isOPERA
Using CSS to lay out your page can save you a significant amount of markup, typically 25% to 50%. First look at the layout to see whether you can substitute CSS lists and positioned div s to simulate the effects that are typically done with tables. Next, strip down the content to structural markup and build it back up again using CSS style and positioning. Then test the new layout with different browsers.
Replacing table layout with CSS layout certainly saves you bandwidth and reduces maintenance headaches. Stripping down your markup to bare structure and replacing any inline style with CSS rules will help fully optimize your HTML. For more information about replacing inline style with CSS rules, please visit CSS Optimization.
You can improve the perceived speed of your web page by loading something useful fast. You can ensure that your useful content (i.e., content that users can navigate with) loads quickly by layering your tables or divs.
Multimedia can also benefit from fast start techniques. Flash presentations can load a separate file quickly while others stream in the background. Movies can load a static placeholder image or preview to show something quickly to help engage the user.
Website performance optimization is not only about raw speed, but also about managing your users' experience.
External scripts referenced in the head of your pages are especially harmful because they delay the display of your body content. Delays before your body content displays make it more likely that users will bail out. Human-computer interaction (HCI) research has shown that delays before viewing pages are less frustrating than delays after a page has loaded.
Post-loading delays are a common problem with Ajax-enabled pages. When it is poorly written, Ajax can make things especially difficult on narrowband users. Even with HTTP compression, the latency due to grabbing all those separate files can cause indeterminate delays. Ajax also introduces polling with the XMLHttpRequest object (XHR).
Another option is to use iframes to load ads, but iframes can ruin the context-sensing abilities of contextual ads and so you must use them carefully.
To reduce the overhead of multiple objects that causes the majority of web page delay, minimize the number of objects referenced within your web pages. Also, put all of your images, still and motion, on a strict file size diet. Minimize the size of the head of your HTML, and layer your markup to display useful content quickly and maximize your potential search engine rankings. Finally, move your CSS to the top and your scripts to the bottom of your pages to enable progressive display.
To maximize web page display speed, you can employ the following 47 website performance optimization techniques: