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 tasked with creating a program what will create take files in
I have tried creating an install file but it never includes the database in
I have tried creating a named pipe but getting GLE 5 (access denied Error)
I have starting creating my first firefox extension. I am following http://extensions.roachfiend.com/howto_bug.html But seems
I have been creating a helper class for the Facebook PHP API in order
I have been creating multiple background threads to parse xml files and recreate new
I have been creating a website with Ruby on Rails, and will be hosting
I have been creating Unit tests like crazy and find that I'm often having
What choices do I have for creating stateful dynamic content in an ASP.Net web
Anyone have any experience creating a modal dialog box using AJAX and ASP.NET MVC?

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.