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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T16:38:40+00:00 2026-05-19T16:38:40+00:00

I noticed that Google sets the expiration of its HTML to a date in

  • 0

I noticed that Google sets the expiration of its HTML to a date in the past:

Expires Thu Jan 01 1970 00:00:00

How do I configure .htaccess to do this? I use ExpiresByType to set the expiration of my other resources, but they are all future times (e.g. access plus 10 years). Any suggestions on how to set it for the past? Thanks.

  • 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-19T16:38:40+00:00Added an answer on May 19, 2026 at 4:38 pm

    By setting the expiration of the HTML to the past, I’m assuming you’re trying to prevent your HTML from being cached. Unfortunately, you cannot use the Expires directive as it only works for future dates. You can use header commands though to control how your HTML files are cached.

    <FilesMatch "\.(html|htm)$">
    FileETag None
    Header unset ETag
    Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
    Header set Pragma "no-cache"
    Header set Expires "Thu, 01 Jan 1970 00:00:00 GMT"
    </FilesMatch>
    

    The mod_headers module will need to be installed in Apache to use this method.

    EDIT: Alternatively, if you’re using PHP, you can set these headers using PHP’s header function.

    header("Cache-Control: max-age=0, no-cache, no-store, must-revalidate");
    header("Pragma: no-cache");
    header("Expires: Thu, 01 Jan 1970 00:00:00 GMT");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently noticed over the past few weeks that Google Chrome appears to be
I've noticed that google calendar doesn't allow me to put html into the body
I have noticed that Google Toolbox for Mac replaces several SQLite built-in functions (LOWER/UPPER,
I have noticed that when you view PDFs in google docs the PDF viewer
I'm using google chrome and I noticed that every time I do an XHR
I noticed that there are two sets of Hadoop configuration parameters: one with mapred.*
I've noticed that google app engine seems to have a fair amount of downtime
I have noticed that in most google maps you can not drag the marker
I am a Google Maps API (JavaScript) developer. I have noticed that Google uses
I noticed that Digg and Google are using a kind of CSS optimization in

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.