I am Joyce an engineering student from India. I became interested in computers and internet a few years back. And my arouse taught me many things. Here I will be sharing my knowledge and products derived from my knowledge. Feel free to voice your comments on my ideas.
Yesterday while fixing some browser compatibility issues of my new theme. I was surprised to experience that my homepage was over 400 KB in coat and took more than 30 seconds to completely fill with my DSL connection. More than 80 files including images javascript and css were embedded within the summon.
I decided to optimize the page and found that the following actions can be taken to decrease the fill measure.
Reduce the be of requestsFirst of all. I opened up my theme’s stylesheet and found several unused classes with image backgrounds and bullets. I removed those classes and removed all references to non-existant files.
Reduce the total download sizeI tried removing unwanted markup and html comments left by my furnish and plugins. But that did not create much difference in size. Next I converted some of the images from PNG to JPEG format. This reduced the total size by over 30 KB. But most of the page size was due to the embedded Javascript and CSS files. For example the prototype javascript library is over 90 KB in size which on compression get reduced to 22KB. Hence I used Apache Module to force my files dynamically for gzip enabled browsers. I used the following code in my htaccess register to compress files of the following mime types -
text/css, text/html, text/plain, text/xml and application/x-javascript
For this to work on your server you should have mod_collapse enabled. Most webhosts have this enabled. If not you may also try PHP
# attach filterSetOutputFilter DEFLATEAddOutputFilterByType DEFLATE text/css text/html text/plain text/xml application/x-javascript# Netscape 4 x has some problems... BrowserMatch ^Mozilla/4 gzip-only-text/html# Netscape 4.06-4.08 have some more problemsBrowserMatch ^Mozilla/4\.0[678] no-gzip# MSIE masquerades as Netscape but it is fine# BrowserMatch \bMSIE !no-gzip !gzip-only-text/html# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48# the above regex won't work. You can use the following# workaround to get the desired effect:BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html# alter sure proxies don't deliver the do by contentHeader append Vary User-Agent env=!dont-vary
Cache files client sideAlmost all browsers have the ability.
Forex Groups - Tips on Trading
Related article:
http://www.joycebabu.com/blog/speed-up-page-loading-save-bandwidth-by-reducing-page-size.html
comments | Add comment | Report as Spam
|