Site optimization

Discussion in 'Announcements and Feedback' started by ekrem, Apr 11, 2010.

  1. ekrem
    Offline

    ekrem VIP Member

    Joined:
    Aug 9, 2005
    Messages:
    7,243
    Thanks Received:
    370
    Trophy Points:
    83
    Ratings:
    +375
    Hello.
    Only some .js files are gzipped and cached by the browser.
    The 2 .css files that you send to the browsers are neither gzipped, nor cached.


    This comes in the .htaccess file in the forums main webserver-directory.
    I tried much, but this was best i achieved so far.
    It is always best practize to gzip ressources directly through Apache rather then the applications installed on server (forum software).
    ________________________________________________


    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault "access plus 1 seconds"
    ExpiresByType image/x-icon "access plus 2592000 seconds"
    ExpiresByType image/jpeg "access plus 2592000 seconds"
    ExpiresByType image/jpg "access plus 2592000 seconds"
    ExpiresByType image/png "access plus 2592000 seconds"
    ExpiresByType image/gif "access plus 2592000 seconds"
    ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"
    ExpiresByType text/css "access plus 604800 seconds"
    ExpiresByType text/javascript "access plus 216000 seconds"
    ExpiresByType application/x-javascript "access plus 216000 seconds"
    ExpiresByType text/html "access plus 600 seconds"
    ExpiresByType application/xhtml+xml "access plus 600 seconds"
    </IfModule>
    # END Expire headers

    # BEGIN Cache-Control Headers
    <IfModule mod_headers.c>
    <FilesMatch "\\.(ico|jpeg|jpg|png|gif|swf)$">
    Header set Cache-Control "max-age=2592000, public"
    </FilesMatch>
    <FilesMatch "\\.(css)$">
    Header set Cache-Control "max-age=604800, public"
    </FilesMatch>
    <FilesMatch "\\.(js)$">
    Header set Cache-Control "max-age=216000, private"
    </FilesMatch>
    <FilesMatch "\\.(php|html|xhtml?)$">
    Header set Cache-Control "max-age=600, private, must-revalidate"
    </FilesMatch>
    </IfModule>
    # END Cache-Control Headers

    # BEGIN Turn ETags Off
    <IfModule mod_headers.c>
    Header unset ETag
    </IfModule>
    FileETag None
    # END Turn ETags Off

    # BEGIN Remove Last-Modified Header
    <IfModule mod_headers.c>
    Header unset Last-Modified
    </IfModule>
    # END Remove Last-Modified Header

    <FilesMatch "\.(js|html|xhtml|text|txt|css|php)$">
    SetOutputFilter DEFLATE
    </FilesMatch>

    ________________________________________________


    This is the Start-Page of USmessageboard.
    You can optimize the images at Yahoo's "smush.it" without quality loss.
    Also the images loaded from theme have no expiries set, meaning browsers load them every time.
    In above .htacces it is covered.

    LINK: Smush.it
    or
    PunyPNG - PNG Compression and Image Optimization - Gracepoint After Five

    [​IMG]





    This is Yahoo-Yslow performance analysis of front-end of one of my websites:
    100 is max.

    [​IMG]



    The score for USmessageboard, I wont post.
    I don't want to meddle in your things.
    But with little work, you could optimize front-end load of website, like caching pictures and scripts, gzipping scripts.
    Minimization of scripts and combining them to reduce DNS-lookups would need more "work".



    From Yahoo:
    LINK: Yahoo - Best Practices for Speeding Up Your Web Site


    You make 21 HTTP-requests on Front-Page.
    Depending on each Users settings for paralell downloads in their browser-settings, this is - like Yahoo says - the area to achive most results in responsiveness of front-end.
    That would need the HTTP-requests to decrease, which is achieved by combining the scripts which make the HTTP-requests.



    P.S: Sorry for meddling in your business.
    And I do not take any responsibilities, if you try something mentioned here.
     
  2. ekrem
    Offline

    ekrem VIP Member

    Joined:
    Aug 9, 2005
    Messages:
    7,243
    Thanks Received:
    370
    Trophy Points:
    83
    Ratings:
    +375
    Above i mentioned several times Gzip, but actually in the -htaccess is used Deflate method of Server.

    Deflate is always faster then Gzip.
    This has been tested everywhere over internet by geeks.

    This guy for example achieves 41% better results using Deflate method over Gzip
    GZip vs. Deflate - Compression and Performance | WebProNews


    So above is already Deflate if you use that .htaccess
     
  3. Gunny
    Offline

    Gunny Gold Member

    Joined:
    Dec 27, 2004
    Messages:
    44,689
    Thanks Received:
    6,753
    Trophy Points:
    198
    Location:
    The Republic of Texas
    Ratings:
    +6,770
    You have issues, don't you?:eusa_eh:
     
    • Thank You! Thank You! x 1
  4. Midnight Marauder
    Offline

    Midnight Marauder BANNED

    Joined:
    Feb 28, 2009
    Messages:
    12,404
    Thanks Received:
    1,876
    Trophy Points:
    0
    Ratings:
    +1,876
    I've found over the years of dealing with and working with folks such as this one in the OP, that generally they are correct. This one is as well.

    However, most of the time for some reason, they expend tremendous energy and thought addressing a problem you really don't have or is one which isn't really all that relevant. This one is as well.

    Some never learn "a difference which makes no difference, is no difference."
     
    • Thank You! Thank You! x 1
  5. asaratis
    Offline

    asaratis Uppity Senior Citizen Gold Supporting Member Supporting Member

    Joined:
    Jun 20, 2009
    Messages:
    12,288
    Thanks Received:
    2,654
    Trophy Points:
    245
    Location:
    Stockbridge
    Ratings:
    +4,520
    A website that needs Viagra (enhancement) is doomed to be impotent.
     
  6. Loisal
    Offline

    Loisal Rookie

    Joined:
    Apr 26, 2010
    Messages:
    5
    Thanks Received:
    0
    Trophy Points:
    1
    Ratings:
    +0
    Pictures are worth a thousand words &#8212; especially on the web, where pages of text can download in the time it takes for a single image to load. Your images may be sub-zero cool, but if they&#8217;re too plump, few people will stick around long enough to see them. We&#8217;ll dig into tricks and optimizations to speed up your GIF, JPG, and PNG downloads.
    Once you&#8217;ve learned the basics of shrinking your images, we&#8217;ll will walk you through the advantages of using CSS for your page layout. And, if you&#8217;re one of those people who insists on using tables, we&#8217;ll offer you a few choice hints on how to get those tables slim and streamlined. After you&#8217;ve removed the bloat from your layout code and your images, you&#8217;ll learn how to cut needless elements from your pages. Hint: Start with all those links. The series concludes with wise words about how to come up with benchmarks for speed and how to test your site using nothing but a stopwatch and a pencil.
     

Share This Page