Jump to content

Recommended Posts

Hey All,

 

I have the below code in my .htaccess file:

 

<IfModule mod_gzip.c>
mod_gzip_on yes
mod_gzip_dechunk yes
mod_gzip_keep_workfiles No
mod_gzip_temp_dir /tmp
mod_gzip_minimum_file_size 1002
mod_gzip_maximum_file_size 1000000
mod_gzip_maximum_inmem_size 1000000
mod_gzip_item_include file \.htm$
mod_gzip_item_include file \.html$
mod_gzip_item_include file \.php$
mod_gzip_item_include file \.css$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_exclude reqheader "User-Agent: .*Mozilla/4\..*\["
</IfModule>

 

This code is correctly gzip compressing files when the browser cache is empty but it is not compressing a CSS file upon refresh (F5).

 

Upon refresh my site checker says:

 

Grade B on Compress components with gzip

 

There is 1 plain text component that should be sent compressed

 

    * _______WEBSITE URL IS HERE________/stylesheet.css

 

It is only upon refresh.

 

Any ideas?

Link to comment
https://forums.phpfreaks.com/topic/165304-htaccess-compression-and-css-files/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.