Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6703105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:07:57+00:00 2026-05-26T07:07:57+00:00

I am currently caching my CSS, JS and images using deflate in my Apache

  • 0

I am currently caching my CSS, JS and images using deflate in my Apache configuration.

Here’s my code:

AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html

AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml

AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

Now when I check my header I see:

Host                www.domain.com
User-Agent          Mozilla/5.0 (X11; Linux i686; rv:6.0.2) Gecko/20100101 Firefox/6.0.2
Accept              text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language     en-us,en;q=0.5
Accept-Encoding     gzip, deflate
Accept-Charset      ISO-8859-1,utf-8;q=0.7,*;q=0.7
Connection          keep-alive
If-Modified-Since   Fri, 30 Sep 2011 01:05:01 GMT
If-None-Match       "124741af-1c4b9-4ae1136f3f9d0"
Cache-Control       max-age=0

Everything looks good, the Accept-Encoding is gzip, deflate which is what I want but now I see the Cache-Control is max-age=0.

Will that defeat the purpose of caching using deflate? Is that mean it’s only caching for 1 day and the next day it won’t cache it or it will have to reload it?

Note: My images rarely change, my CSS and JS change once a week.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T07:07:57+00:00Added an answer on May 26, 2026 at 7:07 am

    These are 2 independent things: mod_deflate and mod_expires

    Here’s some articles you will find interesting:

    http://developer.yahoo.com/performance/rules.html

    LiveHttpHeaders: which cache-control info is right

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are currently using random query-strings to prevent Internet Explorer from caching HTML on
Web programmer here - using AJAX (HTML, CSS, JavaScript, AJAX, PHP, MySQL), but for
I'm using custom controllers that cache static resources (CSS, JS, etc.) and images. I'm
I am using Spring 3.1 Cache using EhCache currently to implement method caching. Consider
I have the following file: <html> <head> <title></title> <link rel=css type=text/css href=/empty.css title=css />
Was wondering is this possible in .htaccess? I'm currently caching .js, .css and all
We are using struts 1.2.4 in our application. The application currently allows caching of
I'm currently thinking about caching most of my viewdata excpt user specific data after
I am currently downloading and caching several different data sets from my server. However
I am caching data in an application I am currently writing and was wondering

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.