{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}


Ico small and cacheable keep components under 25k

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: of "minified code" is the Google Maps engine at: hlp://maps.google.com/ •  An example of "minified library" is YUI’s Pure at: hlp://purecss.io/ •  You can use PHP code from Google to do the job of minifying CSS & JavaScript: hlp://code.google.com/p/minify/ •  The original minifier from Crockford: hlp://www.crockford.com/javascript/jsmin.html Copyright 2009 - 2013 Horowitz 25 Minify vs. Obfuscate An obfuscator minifies but also makes modifications to the program, changing variable names, function names, etc. making it much harder to understand; JSMin and Dojo are two minifiers Copyright 2009 - 2013 Horowitz 26 Rule 11: Avoid Redirects •  Redirects are used to map users from one URL to another •  PHP Redirect <? Header( "HTTP/1.1 301 Moved Permanently" ); Header( "Location: http://www.new-url.com" ); ?> JSP (Java) Redirect <% response.setStatus(301); response.setHeader( "Location", "http://www.new-url.com/" ); response.setHeader( "Connection", "close" ); %> CGI PERL Redirect $q = new CGI; print $q->redirect("http://www.new-url.com/"); Redirect Old domain to New domain (htaccess redirect) •  •  •  •  –  –  –  –  However, redirects insert an extra HTTP round- trip between user and origin server Create a .htaccess file with the below code, it will ensure that all your directories and pages of your old domain will get correctly redirected to your new domain. The .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed) Options +F...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online