[SOLVED] compression not working on combined JS file
Posted: Tue Sep 23, 2014 4:52 am
this is not really a CMSMS question but maybe someone stumbled over this:
i finally got around trying Rolf's "combine javascript on the fly" idea
https://www.cmscanbesimple.org/blog/eas ... s-and-code
(thanks Rolf - working fine).
i couldnt use the suggested naming convention (combined_file.js) as this didnt work on https (long story but that was expected) hence I ended up using the page alias:
this works nicely on all pages, incl. third party e-commerce CMS. only thing failing is server-side compression which looks like this:
how can i tell apache that this file "?page=javascript" should be treated like a regular JS file?
server runs Apache/2.2.27 (Unix)
website "http://www.rpc.com.au"
Thanks.
i finally got around trying Rolf's "combine javascript on the fly" idea
https://www.cmscanbesimple.org/blog/eas ... s-and-code
(thanks Rolf - working fine).
i couldnt use the suggested naming convention (combined_file.js) as this didnt work on https (long story but that was expected) hence I ended up using the page alias:
Code: Select all
<__script__ type="text/javascript" src="?page=javascript">
Code: Select all
<ifModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch ^MSIE !no-gzip !gzip-only-text/html
</ifModule>
server runs Apache/2.2.27 (Unix)
website "http://www.rpc.com.au"
Thanks.