picnictutorials — 2012-11-09T17:13:32-05:00 — #1
mod_deflate: Best way to compress? Via Cpanel vs .htaccess vs php snippet? Im trying to speed up my site. compression is one of the ways i intend to do it. Those are all the ways I've found. What are the plus and minuses of each? Do you prefer one way over the other and why? Thanks!
Ps. Hostgator only uses mod_deflate as far as I know. O is that just in the Cpanel way. Maybe I could gzip or other using one of the other methods??
picnictutorials — 2012-11-09T19:18:40-05:00 — #2
Ok I been reading. I'm going with the htaccess one. Just need to fine tune that code. There are 10 different versions on the web.
picnictutorials — 2012-11-09T22:49:36-05:00 — #3
force — 2012-11-10T23:51:30-05:00 — #4
I typically look at the htaccess file fould in the HTML5 boiler plate for ideas and techniques, since they're vetted by a group of web developers:
You'll find their htaccess file compression solution in there (which I use on the websites I develop).
localhost8080 — 2012-11-11T09:57:47-05:00 — #5
the html5 boilerplate is great if you know what to loo for, but sometimes there are things that you will never use, so i use it like you do, to get ideas
picnictutorials — 2012-11-13T11:07:10-05:00 — #6
OK here is what I ended up with. After reading for weeks on this I think this is the best setup. The only thing it seems I went out on a limb on is caching html for a long time. I toyed with this in my brain. Many say cache css for a long time. Well I can't cache css, or js for that matter, without caching the html. When ever I edit one 9 times out of 10 I'm editing one of the others. Well if one is a new copy and one isn't the user will very likely see something wonky or unstyled, or un-js'ed.
My question is this? Am I missing something about caching the html? Or is the only downside the user waits 90 days to see the updated copy? Additionally Google always sees the newset copy correct? Thanks for your knowledge!
Turn off the ETags
Header unset ETag
Cache Files 90 Days
ExpiresDefault "access plus 90 days"
Header append Cache-Control "public"