Msg#: 4403764 posted 10:14 pm on Jan 4, 2012 (gmt 0)
I am working on code for my .htaccess file to cache and speed up my site.
The code I am talking about is:
<filesMatch "\.(js)$"> Header set Cache-Control "max-age=600, private" </filesMatch>
In sum: What is best practice?
Just trying to be extra safe. Any feedback would be extremely appreciated. Thank you!
Msg#: 4403764 posted 10:58 pm on Jan 4, 2012 (gmt 0)
Thanks incrediBill. Does the same apply with compressing and gzip-ing with the .htaccess? I had read someone claim that because text compressing can remove comments that this could potentially modify adsense code, which is against TOS. Probably just being over-careful, but I just want to make sure I don't screw anything up. Thanks for your reply.
Msg#: 4403764 posted 11:19 pm on Jan 4, 2012 (gmt 0)
you are right - there is a lot of crap out there that is mis-information and sometimes it's hard to know what's what - but I do always want to be super careful, which is why I asked. You've been super helpful - thank you for your help!
Msg#: 4403764 posted 3:12 am on Jan 5, 2012 (gmt 0)
Ah, just remembered there are 'text compressing' programs out there too that reformat the actual HTML code on the page, totally different from gzip compression. The reformatting text compressors actually remove white space and comments from web pages to make them a few hundred bytes smaller, complete waste of time IMO, but those could potentially violate TOS by actually modifying AdSense code.
Those types of page reformatting routines I would avoid.
However, reformatting to save a few bytes isn't gzip. Gzip is a lossless data compression algorithm where data comes out the other end looking just like it did when it started, no changes.