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

  • Home
  • SEARCH
  • 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 3422082
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:10:29+00:00 2026-05-18T06:10:29+00:00

I have creating a minify/obfusctor/gzip script in PHP of all my JS and CSS

  • 0

I have creating a minify/obfusctor/gzip script in PHP of all my JS and CSS files but I can’t expire but I have put this in my .htaccess:

ExpiresActive On
ExpiresDefault A0
ExpiresByType text/css "access plus 2 hours"
ExpiresByType text/javascript "access plus 2 hours"
ExpiresByType application/x-javascript "access plus 2 hours"
Header append Cache-Control "proxy-revalidate"

<FilesMatch "\.(xml|txt|html|js|css)$">
    ExpiresDefault A7200
    Header append Cache-Control "proxy-revalidate"
</FilesMatch>

<FilesMatch "\.(php|cgi|pl|htm)$">
    ExpiresActive Off
    Header set Cache-Control "private, no-cache, no-store, proxy-revalidate, no-transform"
    Header set Pragma "no-cache"
</FilesMatch>

I want to expire all types text/javascript and text/css even if the extractor is a PHP file.

How can I do that?

Thx!


yes i put header("Content-Type: text/javascript; charset=UTF-8");

Here is the entire HTTP Header :

Date: Sat, 20 Nov 2010 19:02:05 GMT
Server: Apache/2.2.11 (Win32) PHP/5.3.0
X-Powered-By: PHP/5.3.0
Content-Encoding: gzip
Last-Modified: Sat, 20 Nov 2010 16:03:24 GMT
Cache-Control: private, no-cache, no-store, proxy-revalidate, no-transform
Content-Length: 181781
Pragma: no-cache
Keep-Alive: timeout=5, max=99
Connection: Keep-Alive
Content-Type: text/javascript; charset=UTF-8

200 OK
  • 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-18T06:10:30+00:00Added an answer on May 18, 2026 at 6:10 am

    Okay resolved, i used mod_expires and i removed the Header append for PHP files.

    ExpiresActive On
    ExpiresDefault A1
    ExpiresByType text/javascript A7200
    ExpiresByType application/x-javascript A7200
    
    <FilesMatch "\.(js)$">
    Header append Cache-Control "max-age=7200, private"
    </FilesMatch>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been creating a web scraper for an internal application with PHP but
I have been creating an image gallery with jQuery, all is done. The images
So far I have been creating Web Portal but recently I had a request
I have problems creating a custom query. This is what entities: @Entity public class
What ways do I have for creating a unit test template like this? I'm
I have creating a login form where I have created sqlite database,in this I
I have been creating an image uploading site for a while now but have
I have succeed creating a popup using this code in c# and wpf <Popup
I have tried creating an install file but it never includes the database in
I have been creating a helper class for the Facebook PHP API in order

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.