Quantcast
Channel: Joomla! Forum - community, help and support
Viewing all articles
Browse latest Browse all 1912

Performance - Joomla! 5.x • Htaccess cache-control does not work for JS files

$
0
0
Maybe not 100% Joomla related, but...

The JS files are not cached.
I use the following in .htaccess

Code:

<ifModule mod_headers.c>(...)  # CSS & JS - 1 week  <filesMatch "\.(css|js)$">    Header set Cache-Control "max-age=604800, public"  </filesMatch></ifModule>
Oddly it does work for css files.
For images too. Removed for clarity.

So does

Code:

<IfModule mod_expires.c>  ExpiresActive on  ExpiresByType text/javascript    "access plus 604800 seconds"</ifModule>
I also gave it it's own line, like <filesMatch "\.js$">.
But nope.

What am I missing?
How do I get Cache-Control working for JS files too?


Thank you, Wim

Statistics: Posted by Mr. Wimpy — Tue Sep 17, 2024 9:02 am



Viewing all articles
Browse latest Browse all 1912

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>