random1 Posted July 9, 2009 Share Posted July 9, 2009 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? Quote Link to comment https://forums.phpfreaks.com/topic/165304-htaccess-compression-and-css-files/ Share on other sites More sharing options...
corbin Posted July 9, 2009 Share Posted July 9, 2009 Does your CSS file happen to be under 1002 bytes? Quote Link to comment https://forums.phpfreaks.com/topic/165304-htaccess-compression-and-css-files/#findComment-871756 Share on other sites More sharing options...
random1 Posted July 9, 2009 Author Share Posted July 9, 2009 The stylesheet size: Size on Disk: 12.0 KB (12,288 bytes) Size: 26.6 KB (27,300 bytes) Quote Link to comment https://forums.phpfreaks.com/topic/165304-htaccess-compression-and-css-files/#findComment-871762 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.