Friday, July 11, 2008

Some optimization tips for identi.ca

Okay some quick tips for Identi.ca




This post is really ugly(formatting), but I just wanted to put it online because I don't know when I get time to improve this.


- 1. Install Firefox If you don't allready have it.
* http://www.mozilla.com/en-US/firefox/?from=getfirefox

- 2. Install Firebug(If not allready installed) because it is needed for YSlow and also the best firefox debugger extension alive.
* https://addons.mozilla.org/en-US/firefox/addon/1843

- 3. Install Yslow to see what can be improved.
* http://developer.yahoo.com/yslow/

- 4. Improve things Yslow points out that can be improved, which can pretty quick
a. Click on Y-slow icon at the site identi.ca



b. Find out which things can be improved by inspecting yslow

- 5. CDN first. See http://developer.yahoo.com/performance/rules.html#cdn for more info. This is 1 thing which I can never do because I have only 1 server I can use.

- 6. Adding expire headers. See http://developer.yahoo.com/performance/rules.html#expires for more info. An easy way to do this is by adding some lines to your .htaccess. Offcourse the directives have to be enabled to work.


enable expirations
ExpiresActive On
ExpiresByType text/css "access plus 1 year"
ExpiresByType application/x-javascript "access plus 1 year"
ExpiresByType application/javascript "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresDefault "access plus 3 days"


- 7. Gzip components. See http://developer.yahoo.com/performance/rules.html#gzip for more info. In Apache you can do this by adding lines to .htaccess.


AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/javascript



- 8. Put JS at the bottom. See http://developer.yahoo.com/performance/rules.html#js_bottom for more info. This 1 is really easy if your is writter properly(progressive enhancement). Just put your javascript files right before



- 9. Configure Etags. See http://developer.yahoo.com/performance/rules.html#etags for more info. This One can also be done real quick with by adding some lines .htaccess


FileETag none


- 11. Let the google cloud host your jquery library. See http://code.google.com/apis/ajaxlibs/ for more info.

- 10. One important thing i should note is that your files should have versioning for this to work so for example if you update jquery.min.js you should rename the file to jquery1.min.js

- 11. Off course you should first test this locally before pushing it online.

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]