Name: Aoe_JsCssTstamp
Owner: AOE
Description: Automatic Versioning of JS and CSS files for Magento
Created: 2012-04-25 19:07:39.0
Updated: 2017-09-29 10:14:36.0
Pushed: 2017-08-18 14:13:22.0
Size: 261
Language: PHP
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Author: Fabrizio Branca
This module adds the last-modified timestamp to your JS and CSS merged files to enabled browser-based caching and speed up your server.
Add following lines to your .htaccess file if storage is set to “database” and you are using apache as your web server.
Get merged js and css files from database using get.php if they do not exist in filesystem
iteCond %{REQUEST_URI} ^/media/css/.*\.css$ [OR]
iteCond %{REQUEST_URI} ^/media/js/.*\.js$
never rewrite for existing files
iteCond %{REQUEST_FILENAME} !-f
iteRule .* ../get.php [L]
If you enable one of the following in the configuration make sure to add this to your .htaccess file:
iteRule (.*)\.(\d{10})\.(gif|png|jpg)$ $1.$3 [L,NC]
iteRule (.*)\.(\d{10})\.(css)$ $1.$3 [L,NC]
iteRule (.*)\.(\d{10})\.(js)$ $1.$3 [L,NC]
If you use NGINX, add the following lines to your nginx config within the server block for your site if you use database as the file storage location:
tion ^~ /media/js/ {
try_files $uri $uri/ @handlerjs;
tion ^~ /media/css/ {
try_files $uri $uri/ @handlercss;
tion @handlerjs {
rewrite /media/js/ /get.php;
tion @handlercss {
rewrite /media/css/ /get.php;
they should NOT be added to any particular location block.
ite "^/(.*)\.(\d{10})\.(gif|png|jpg)$" /$1.$3 last;
ion method="addItem">
e>skin_js</type>
e>js/app.js</name>
ams/>
>
d/>
o>100</prio>
tion>