HighPerformanceWebSites

These cookies are unnecessary network trac make sure

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ollowSymLinks RewriteEngine on RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L] REPLACE www.newdomain.com in the above code with your actual domain name. contact every backlinking site to modify their backlink to point to your new website. Note* This .htaccess method of redirecOon works ONLY on Linux servers having the Apache Mod- Rewrite module enabled. Copyright 2009 - 2013 Horowitz 27 Rule 11: Avoid Redirects Copyright 2009 - 2013 Horowitz 28 Rule 12: Remove Duplicate Scripts •  Hurts performance –  Extra HTTP requests (IE only) –  Extra execuOons •  Is it atypical –  2 of the top 10 websites contain duplicate scripts (JS and CSS) Copyright 2009 - 2013 Horowitz 29 Rule 13: Configure ETags •  Etags are used by clients and servers to verify that a cached resource is valid –  To check that the resource (image, script, stylesheet, etc.) in the browser’s cache matches the one on the server –  If there is a match, the server returns a 304 •  Unique idenOfier returned in response Etag: “c8897e-aee-4165acf0” Last-Modified: Thu, 07 Oct 2008 20:54:08 GMT •  Used in condiOonal GET requests If-None-Match: “c8897e-aee-4165acf0” If-Modified-Since: Thu, 07 Oct 2008 20:54:08 GMT •  If Etag doesn’t match, can’t send 304 •  Etag format varies across web servers –  –  Apache: inode-size-timestamp IIS: FileTimestamp:ChangeNumber •  Use ‘em or lose ‘em –  Apache: FileETag none –  IIS: http://support.microsoft.com/kb/922703/ Copyright 2009 - 2013 Horowitz 30 Rule 14: Make AJAX Cacheable and small •  •  •  •  The URL of an AJAX request is included inside the HTML; as it is not bookmarked or linked to, the requesOng page can be cached by the browser The AJAX request URL should include a dynamic v...
View Full Document

Ask a homework question - tutors are online