views:

112

answers:

1

Hi,

I've recently tried to optimize my site for speed and brandwith. Amongst many other techniques, I've used GZIP on my .css and .js files.

Using PuTTY I compressed the files on my site and then used:

<IfModule mod_rewrite.c>
 RewriteEngine On
 RewriteCond %{HTTP:Accept-encoding} gzip
 RewriteCond %{HTTP_USER_AGENT} !Konqueror
 RewriteCond %{REQUEST_FILENAME}.gz -f
 RewriteRule ^(.*)\.css$ $1.css.gz [QSA,L]
 RewriteRule ^(.*)\.js$ $1.js.gz [QSA,L]
 <FilesMatch \.css\.gz$>
  ForceType text/css
 </FilesMatch>
 <FilesMatch \.js\.gz$>
  ForceType text/javascript
 </FilesMatch>
</IfModule>
<IfModule mod_mime.c>
 AddEncoding gzip .gz
</IfModule>

in my .htaccess file so that they get served properly because all my links are without the ".gz".

My problem is, I cant work on the GZIP file in Dreamweaver. Is there a plugin or extension of somesort that allows Dreamweaver to temporarily uncompress thses files so it can read them?

Or is there a way that I can work on my local copies as regular files, and server side they automatically get compressed when they are uploaded.

Or is there a different code editor I should be using that would completely get around this?

Or a just a different technique to doing this?

I hope this question makes sense,

Thanks

+1  A: 

Dreamweaver do not have the capability built in to natively work with zipped or gzipped files. After you pull down a file from your server, you would need to extract the file(s), make your edits, and then re-pack the file(s) to upload them. If you do not have an application locally to do this, I'd suggest: 7-Zip: http://7-zip.org/

A server side solution could also be used, but I guess that you'd have to have a caching mechanism on the sever that would first check if a newer version of a file exists, if it does then gzip it, if not move on to serving the file. Perhaps ask a new question specific to gzip files to serve using the server language of your choice, I'm sure there are a number of solutions out there.

Danilo Celic