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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:15:49+00:00 2026-06-10T13:15:49+00:00

I used Chrome to audit my site and I discovered .js and .css files

  • 0

I used Chrome to audit my site and I discovered .js and .css files weren’t being cached though I had set up my .htaccess file to do so.

I removed everything from my site’s root htaccess file except the code below and I’m still getting the message “The following resources are explicitly non-cacheable. Consider making them cacheable if possible” in Chrome indicating my main external .js and .css files aren’t being cached. These files and images represent like 90% of the total download size so not being able to cache them is driving me crazy.

This is currently the code of my .htaccess file. Having it exactly like this still doens’t cache anything.

# Disable Etags
Header unset ETag
FileETag None

# Expires
ExpiresActive On
ExpiresDefault "access plus 1 year"
Header unset Last-Modified
Header set Cache-Control "public"

<FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi|html?)$">
Header set Cache-Control "private, must-revalidate, proxy-revalidate"
ExpiresDefault A0
ExpiresActive Off
</FilesMatch>

# Enable Compresion
<FilesMatch ".(js|css|html|htm|php|xml)$">
SetOutputFilter DEFLATE
</FilesMatch>

You can see this code not working at http://lujanventas.com

How can I set cache control public to .css, .js and image files?

  • 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-06-10T13:15:49+00:00Added an answer on June 10, 2026 at 1:15 pm

    At the moment of writing, your running server generates headers that way for JavaScript:

    Expires: access plus 1 day
    

    This is incorrect, it should have been replaced by effective date and time. So it explains no browser is able to cache the resource properly.

    According to documentation, there is no reason why it does not work.

    Is there any hidden character in your configuration that prevents Apache2 to parse the line properly ? Try to delete the line ExpiresDefault line and type it again from scratch in an reliable text editor.

    If still failing, where does your Apache2 version/binary comes from ?

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

Sidebar

Related Questions

My site used to look the same in IE, Chrome, Firefox. Today, I looked
This code is being used on a Chrome Extension. When I call the "showOrHideYT()"
I come from Chrome extensions, so I'm used to defining when a file should
I used the Chrome Console to write a simple statement: console.log(4) and received the
I'm used to debugging JavaScript in Chrome or Firefox just because their built in
I'm trying to write a chrome extension that is used in the GMail compose
I used the phonegap website to create an IPA file. Now I want to
If you have ever used a new release of either Chrome or Safari, you
I have used Firefox, Chrome and now Opera. Everytime when I switch browsers, I
Telerik RadGrid ExportToCSV was used in my RadGrid, but it's not working in Chrome,

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.