Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > questions about compressing web page downloads with Gzip

Reply
Thread Tools

questions about compressing web page downloads with Gzip

 
 
Jonathan N. Little
Guest
Posts: n/a
 
      09-02-2010
Neredbojias wrote:

> I tried the line on one of my existing pages. Compressed ~40k down to
> under 10k but there is roughly 25-30k loaded in remote css and js
> files.


You can compress those as well, either in your httpd.conf if you have
control, or in an .htacess file:

# Compress JS & CSS
AddOutputFilterByType DEFLATE text/css text/javascript

# Why not other text files
AddOutputFilterByType DEFLATE text/html text/plain text/xml



--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
 
 
 
Mike S
Guest
Posts: n/a
 
      09-02-2010
On 9/2/2010 6:16 AM, Jonathan N. Little wrote:
> Neredbojias wrote:
>
>> I tried the line on one of my existing pages. Compressed ~40k down to
>> under 10k but there is roughly 25-30k loaded in remote css and js
>> files.

>
> You can compress those as well, either in your httpd.conf if you have
> control, or in an .htacess file:
>
> # Compress JS & CSS
> AddOutputFilterByType DEFLATE text/css text/javascript
>
> # Why not other text files
> AddOutputFilterByType DEFLATE text/html text/plain text/xml


Thanks for mentioning that!

 
Reply With Quote
 
 
 
 
Jonathan N. Little
Guest
Posts: n/a
 
      09-02-2010
Mike S wrote:
> On 9/2/2010 6:16 AM, Jonathan N. Little wrote:


>> # Compress JS & CSS
>> AddOutputFilterByType DEFLATE text/css text/javascript
>>
>> # Why not other text files
>> AddOutputFilterByType DEFLATE text/html text/plain text/xml

>
> Thanks for mentioning that!
>


Depending on your sever setup for javascript you may also need:

application/x-javascript

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
Mike S
Guest
Posts: n/a
 
      09-02-2010
On 9/2/2010 4:35 PM, Jonathan N. Little wrote:
> Mike S wrote:
>> On 9/2/2010 6:16 AM, Jonathan N. Little wrote:

>
>>> # Compress JS & CSS
>>> AddOutputFilterByType DEFLATE text/css text/javascript
>>>
>>> # Why not other text files
>>> AddOutputFilterByType DEFLATE text/html text/plain text/xml

>>
>> Thanks for mentioning that!
>>

>
> Depending on your sever setup for javascript you may also need:
>
> application/x-javascript


Thanks very much Johnathan, this is good to know.

 
Reply With Quote
 
Neredbojias
Guest
Posts: n/a
 
      09-03-2010
On 02 Sep 2010, "Jonathan N. Little" <(E-Mail Removed)> wrote:

> Neredbojias wrote:
>
>> I tried the line on one of my existing pages. Compressed ~40k down
>> to under 10k but there is roughly 25-30k loaded in remote css and js
>> files.

>
> You can compress those as well, either in your httpd.conf if you have
> control, or in an .htacess file:
>
> # Compress JS & CSS
> AddOutputFilterByType DEFLATE text/css text/javascript
>
> # Why not other text files
> AddOutputFilterByType DEFLATE text/html text/plain text/xml


I'll have to try that.

--
Neredbojias

http://www.neredbojias.org/
http://www.neredbojias.net/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compressing Business Objects through web service Chris Kennedy ASP .Net 1 07-19-2009 01:33 PM
using gzip compress jsp page? cn.popeye Java 2 09-12-2006 12:34 PM
compressing big files balado Firefox 2 05-16-2005 08:00 AM
Compressing entire ASP.NET or WebService page mtv ASP .Net Web Services 2 12-14-2004 10:10 AM
Making the switch in html page reader from header info to gzip main content steven Java 0 11-10-2004 08:29 AM



Advertisments