.js extension with a
.js extension to
.php, to arrive at something similar to
compressed-js.php. Remember to use the new name when referencing the file (i.e.,
Here is the same PHP script commented with functional explanations:
Overview: This method involves placing the PHP script in a separate
.php file and adding a set of rules to an .
Here is the same .
htaccess ruleset commented with functional explanations:
Functional Summary: The .
.js extensions renamed to
.php) parsed from the current directory. And finally, Apache is instructed to compress automatically every parsed document in the current directory.
- Internet Explorer 5 and up: works great
- Netscape Navigator 6 and up: works fine
- Mozilla/Firefox: all versions seem to work
- Opera: does not cache compressed content