I suppose you refer to the concatenated Javascript (with get_scripts.js.php) and phpmyadmin.css.php. With zlib.output_compression=on in php.ini I can see them being served compressed.
I guess you will have to have zlib.output_compression=on in php.ini for webserver to automatically deal with the compression.
As Marc mentioned the idea was to avoid a dependency on a php.ini setting
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I would not handle this in PHP as I said. If you set the right header, the webserver can decide on its own, if this ressource can/should be compressed:
I suppose you refer to the concatenated Javascript (with get_scripts.js.php) and phpmyadmin.css.php. With zlib.output_compression=on in php.ini I can see them being served compressed.
See the attached images
Madhura,
the idea was to avoid a dependency on a php.ini setting.
I see
If the CSS/JS is static just use style like this for every new release:
pma-<? print md5(PMA_VERSION_NUMBER) ?>.css
pma-<? print md5(PMA_VERSION_NUMBER) ?>.js
Of course you have:
a) to prepare the correct css/jss files in the folder OR
b) better solution: add a rewrite like "pma-[0-9a-z]{32}.(?:js|css)" to the pma.[js|css] file
If you want to parse it with php just make the rewrite to the the php file and set the correct Content-Type and expire date as needed, example:
header('Content-Type: text/javascript; charset=utf-8');
header('Expires: '.gmdate('D, d M Y H:i:s', time() + 604800).' GMT');
Then the webserver will deal with the compression.
I guess you will have to have zlib.output_compression=on in php.ini for webserver to automatically deal with the compression.
As Marc mentioned the idea was to avoid a dependency on a php.ini setting
I would not handle this in PHP as I said. If you set the right header, the webserver can decide on its own, if this ressource can/should be compressed:
header('Content-Type: text/javascript; charset=utf-8');
Then for example NGinX will compress it automatically, if compression is enabled and the appropriated types are set:
gzip on;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
Apache or other webservers are similar.
Fix: https://github.com/phpmyadmin/phpmyadmin/pull/1638