1. Enable GZip in an .htaccess file

    March 3, 2011 by J.P.

    Here is the code to enable gzip in an .htaccess file.
    # compress text, html, javascript, css, xml:
    AddOutputFilterByType DEFLATE text/plain
    AddOutputFilterByType DEFLATE text/html
    AddOutputFilterByType DEFLATE text/xml
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE application/xml
    AddOutputFilterByType DEFLATE application/xhtml+xml
    AddOutputFilterByType DEFLATE application/rss+xml
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE application/x-javascript

    Here is a good read on why to use GZIP.

    Once enabled you can see the site load improvement here: http://www.whatsmyip.org/http_compression/

    View the compression results for this site here.


  2. CSS Transform Tool

    by J.P.

    transfrom
    Here is a rough proof of concept demo I created to show the CSS3 transform property.

    Click here to see demo


  3. Pseudo Elements :before and :after with CSS 2.1

    by J.P.

    Here is a quick example of how to use Pseudo elements “:before” and “:after” with css.
    li{
    display:block;
    }
    li:before{
    content:"This is red from :before";
    color:red;
    }
    li:after{
    content:"This is blue from after";
    color:blue;
    }

    Click here for the demo page



« Newer Posts