...

View Full Version : Compress Resource Files



vw98034
04-01-2011, 01:34 AM
Google Page Speed tells me that I need to compress resource files to speed up the download time. I follow the instruction to gzip the Javascript files and replace the .gz file with Javascript files in the same directory. But I get an error on Javascript and ask to install it. I open the zip file and it seems to be right.

What is wrong?

BulletTimeBill
04-01-2011, 02:50 AM
I assume it's talking about images. A js file is what? A few kilobytes?

vw98034
04-01-2011, 10:55 PM
I assume it's talking about images. A js file is what? A few kilobytes?

Can you compress image files for web page download? My site has quite few images on the main pages. They are slow, very noticeable particularly for oversea users.

For my case, the Page Speed says I can cut down CSS and Javascript file sizes. It doesn't say anything on image file compression.

oesxyl
04-02-2011, 06:24 AM
I assume it's talking about images. A js file is what? A few kilobytes?
few kilobytes in few files could mean something. Also if you load them from google or yahoo you need to wait for connections, send/recive few times headers, response.
This means a bigger load time.


Can you compress image files for web page download? My site has quite few images on the main pages. They are slow, very noticeable particularly for oversea users.

For my case, the Page Speed says I can cut down CSS and Javascript file sizes. It doesn't say anything on image file compression.
css, js, usualy removing blank spaces, renaming variables and identifieres, classes to shortes names, i'm not sure about this but , you can find some tools.

http://analyze.websiteoptimization.com/wso

images are usualy compressed. what you can do is in some cases to put one or more in a single one and use css to display only some parts of it as you need. Also reduce number of colors, image size, resolution, remove exif, included thumbnails. As before, i'm not sure but probably you can find some tools too.

best regards

Apostropartheid
04-02-2011, 07:54 PM
Using server-side compression will save you more bytes than removing whitespace ever will. If you get rid of spaces your files become essentially unmaintainable anyway.

Reducing image file sizes depends entirely on the file format of the images you're using.

sguduru
04-02-2011, 08:20 PM
regarding compress images - you cannot really compress but we can sprite all images in to one image to reduce HTTP requests.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum