S
S
Sergey Pugovkin2016-04-12 17:00:32
PHP
Sergey Pugovkin, 2016-04-12 17:00:32

How to add Cache-Control (Apache) header depending on content-type (details inside)?

How to add Cache-Control (Apache) header depending on content-type?
So far done like this:

<FilesMatch "\.(txt|xml|js|css|svg|gif|png|jpg)$">
    Header set Cache-Control "public, must-revalidate, max-age=864000"
</FilesMatch>

But some scripts are generated dynamically via PHP and sent to the browser, the FilesMatch option doesn't work here...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DuD, 2016-04-12
@Driver86

For those scripts that are automatically generated, the title must be set from php.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question