I noticed that module don`t add lines in rules generation if enabled Etags and DefaultCharset utf-8... That working in stable 6.x-1.18 version...
I must manually add following lines in .htaccess for my boost configuration:
AddDefaultCharset utf-8
FileETag MTime Size
<FilesMatch "(\.html|\.html\.gz|\.xml|\.xml\.gz|\.json|\.json\.gz)$">
<IfModule mod_headers.c>
Header set Expires "Sun, 19 Nov 1978 05:00:00 GMT"
Header set Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
</IfModule>
</FilesMatch>
<IfModule mod_mime.c>
AddCharset utf-8 .html
AddCharset utf-8 .xml
AddCharset utf-8 .css
AddCharset utf-8 .js
AddCharset utf-8 .json
AddEncoding gzip .gz
</IfModule>
<FilesMatch "(\.html|\.html\.gz)$">
ForceType text/html
</FilesMatch>
<FilesMatch "(\.xml|\.xml\.gz)$">
ForceType text/xml
</FilesMatch>
<FilesMatch "(\.json|\.json\.gz|\.js|\.js\.gz)$">
ForceType text/javascript
</FilesMatch>
<FilesMatch "(\.css|\.css\.gz)$">
ForceType text/css
</FilesMatch>
Comments
Comment #1
mikeytown2 commentedThey get placed in a cache dir .htaccess file. I need to create an option to have an all in one option like the old way.
Comment #2
mladenu commentedYes, i saw that, but except "FileETag MTime Size"... Do that option Mike! :) Regards!
Comment #3
armyofda12mnkeys commentedIs this still an issue?
i went from 6.x-.1.18 to 6.x-1.21 today. and noticed the 'Add "AddDefaultCharset utf-8" to the htaccess rules' checkbox on the settings page doesn't add the 'AddDefaultCharset utf-8' line to the .boost .htaccess generated rules page.
Also have the .htaccess rules gotten simpler?
It went from this (under 6.x-1.18):
to this (6.x-1.21):
Comment #4
Anonymous (not verified) commentedYou need to be looking at the rules generated in cache/normal/ not the rules generated for the root .htaccess.
Comment #5
armyofda12mnkeys commentedHey Philip_Clarke,
Thanks for quick followup...
I dont see a generated .htaccess file under/home/mysite.com/cache/normal (do see it under /home/mysite.com/cache/ though)..
Anyway, why wouldnt the generated .htaccess rule file under /home/mysite.com/cache/ be the same as what i see under the Boost admin rule generation page: admin/settings/performance/boost-rules
I assume I should copy what I see on that admin/settings/performance/boost-rules page, vs looking on the file system?
Thanks,
-Arian
Comment #6
armyofda12mnkeys commentedand just wanted to clarify... Im not looking at the sites .htaccess file. Im just looking for the BOOST generated .htacess rules to put into that.
But i see differences from my old root .htaccess file BOOST section, and the admin/settings/performance/boost-rules page.
Comment #7
Anonymous (not verified) commentedYou've listed two issues.
Comment #8
armyofda12mnkeys commentedwhoops. K I realize now characterset only should get added to cache/.htaccess ... I might have manually added that 'AddDefaultCharset utf-8' line to the root/.htaccess file
For the 2nd issue (should i open a new Issue here?)...
yes, my original post has listed 1st: the root/.htaccess file which i thought I got generated from the old 6.x-1.18 module.
and 2nd: the admin/settings/performance/boost-rules output currently from 6.x-1.21 module which I am debating putting into the root/.htaccess file (but such a large difference between them, that I got scared).
For example, the boost-gzip-cookie-test.html line and the .gz stuff above it is not in the new generated code.
Comment #9
Anonymous (not verified) commentedPlease just post the differences from the root .htaccess files from
### BOOST START ###
etc...
### BOOST END ###
and I'll highlight anything that seems unusual/ inappropriate.
regarding the UTF-8 matter, it's a little risky placing it in the root .htaccess. The reasons are multiple although UTF-8 has been around a long time, the backend of MySQL can be in Latin-1 or a variety of character sets. Likewise with forms and data entry where HTML and browsers didn't really have any uniformity about which character set was being used, and then there are the drupal modules themselves that may have been edited and output information in ASCII, plus the inclusion of javascript that could very well have been edited in an entirely differing character set. One can be fairly sure that when all combined together and then saved out into the cache that UTF-8 is going to be the standard and so the header is valid but in the root .htaccess file I'd avoid it.
Comment #10
armyofda12mnkeys commentedHere are the main diffs:
Old one produces this at the beginning:
and also new one produces this:
...
I figured out that this one diff is dynamically based on turning on Gzip compression in Drupal's Boost Performance page... so thats one of main reasons there were this major diff below between upgrades (as I turned Drupal Boost Gzip Compression off since Apache already has it on.):
Old one had this... but new one adds same kinda code if turn on compression. Whoops didn't think about that when I posted question.:
Comment #11
Anonymous (not verified) commentedDRUPAL_UID is a cookie to ensure that the served pages are for anonymous users only. Sometimes it gets triggered by modules that don't set their own cookies for data storage and use a dummy drupal session (alas nothing that we can do about other modules that don't follow the guidelines and modify drupal core features).
I would suggest testing gzip compression very carefully and checking the bug list for the known issues revolving around mod_mime and mod_headers, there are combinations that unfortunately mean that with chrome in particular the filesize header goes awry and sends and the browser displays just a blank page.
Personally I would also avoid the compressed css and javascript and turn on mod_deflate which adds more cpu cycles but is more stable and less pache module configuration dependent.