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 5983389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:13:24+00:00 2026-05-22T22:13:24+00:00

if there is no expires http header set in the response , what does

  • 0
  1. if there is no expires http header set in the response , what does it mean for browsers?
  2. In Glassfish v3, how to configure expires header for static resources that have been deployed under docroot not as a war file?
  3. I noticed that Glassfish seems to set ETag header by default. Is that true?
    The ultimate goal I want to achieve here is to set a far future expires header but be able to tell browsers “there is new stuff” whenever new version of css, js, image files are deployed.

Thanks so much for any advices.

  • 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-22T22:13:25+00:00Added an answer on May 22, 2026 at 10:13 pm

    For expires not provided in header of the server response, see §14.21 here:
    http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

    Even when provided, expires is overriden by the max-age directive, thus if expires is not provided max-age is used. If none are provided, then see §13.2.4 here:
    http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.2.4
    Basically it says the client can set cache for an undetermined period of time, and not consistently.

    To solve your problem, you may say your static elements never expire, and add an expire time to the included elements of a HTML doc. To do that, see here:
    http://www.tipsandtricks-hq.com/how-to-add-far-future-expires-headers-to-your-wordpress-site-1533

    Quoted: “To add expires header to the image, CSS, javascript files add the following to your .htaccess file

    Expire Header

    > <FilesMatch "\.(ico|jpg|jpeg|png|gif|js|css|swf)$">
    > ExpiresDefault "access plus 2 hours"
    > </FilesMatch>
    

    or Expire images header

    > ExpiresActive On 
    > ExpiresDefault A0
    > ExpiresByType image/gif A2592000
    

    […]
    Keep in mind that when you use expires header the files are cached in the browser until it expires so do not use this on files that changes frequently. If you change/update a file that has a far future expiry (eg. CSS or javascript files) then you should rename that file and use the renamed version so the browser doesn’t fetch the old file.”

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

Sidebar

Related Questions

Is there a way that I can Programmatically set an Expires Header in code
If I have a raw HTTP response as a string: HTTP/1.1 200 OK Date:
I have a particular HTTP response which I don't want cached because it has
Wondering if there is a good way to generate temporary URLs that expire in
There is a conversion process that is needed when migrating Visual Studio 2005 web
There are numerous Agile software development methods. Which ones have you used in practice
The google page speed tool recommends me to set 'Expires' headers for images etc.
I have finalized a small PHP application that can serve many documents. These documents
I have a .Net 3.5 website which uses windows authentication and expires the session
I have a configuration that doesn't seem too common on the Internets (PHP with

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.