Recommendations
- PageSpeed
-
- Avoid a character set in the meta tag
- Avoid bad requests
- Avoid CSS @import
- Avoid CSS expressions (deprecated)
- Avoid document.write (deprecated)
- Avoid Flash on mobile webpages (deprecated)
- Avoid landing page redirects
- Avoid Plugins (deprecated)
- Combine external CSS (deprecated)
- Combine external JavaScript (deprecated)
- Combine images using CSS sprites
- Defer loading of JavaScript (deprecated)
- Defer parsing of JavaScript
- Enable gzip compression
- Enable Keep-Alive
- Improve server response time (deprecated)
- Inline small CSS
- Inline small JavaScript
- Leverage browser caching
- Leverage proxy caching (deprecated)
- Make landing page redirects cacheable (deprecated)
- Minify CSS
- Minify HTML
- Minify JavaScript
- Minimize cookie size (deprecated)
- Minimize DNS lookups (deprecated)
- Minimize redirects
- Minimize request size
- Optimize images
- Optimize the order of styles and scripts
- Parallelize downloads across hostnames (deprecated)
- Prefer asynchronous resources
- Put CSS in the document head
- Remove query strings from static resources
- Remove unused CSS (deprecated)
- Serve resources from a consistent URL
- Serve scaled images
- Serve static content from a cookieless domain (deprecated)
- Specify a cache validator
- Specify a character set early
- Specify a Vary: Accept-Encoding header
- Specify a viewport for mobile browsers (deprecated)
- Specify image dimensions
- Use an application cache (deprecated)
- Use efficient CSS selectors (deprecated)
- YSlow
-
- Add Expires headers
- Avoid AlphaImageLoader filter
- Avoid CSS expressions
- Avoid empty src or href
- Avoid HTTP 404 (Not Found) error
- Avoid URL redirects
- Compress components with gzip
- Configure entity tags (ETags)
- Do not scale images in HTML
- Make AJAX cacheable
- Make favicon small and cacheable
- Make fewer HTTP requests
- Make JavaScript and CSS external
- Minify JavaScript and CSS
- Put CSS at the top
- Put JavaScript at bottom
- Reduce cookie size
- Reduce DNS lookups
- Reduce the number of DOM elements
- Remove duplicate JavaScript and CSS
- Use a Content Delivery Network (CDN)
- Use cookie-free domains
- Use GET for AJAX requests
YSlow: Avoid URL redirects
Overview
Avoid using URL redirects as they add additional delays to a page load.
How does your site score on this recommendation?
Details from Yahoo!
URL redirects are made using HTTP status codes 301 and 302. They tell the browser to go to another location.
Inserting a redirect between the user and the final HTML document delays everything on the page since nothing on the page can be rendered and no components can be downloaded until the HTML document arrives.
Summary
ContentMedium
Moderate
87%
YSlow recommends:
One of the most wasteful redirects happens frequently and web developers are often not aware of it.
It occurs when a trailing slash (/) is missing from a URL that should otherwise have one.
For example, going to http://astrology.yahoo.com/astrology
results in a 301 response containing a redirect to http://astrology.yahoo.com/astrology/
(notice the added trailing slash).
This is fixed in Apache by using Alias or mod_rewrite, or the DirectorySlash directive if you're using Apache handlers.
Connecting an old web site to a new one is another common use for redirects. Others include connecting different parts of a website and directing the user based on certain conditions (type of browser, type of user account, etc.).