How to enable browser caching for my site? Do I just put cache-control:public somewhere up in my header like this?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
Cache-Control:public;
>
I am using the latest version of PHP developing on the latest version of XAMPP.
OWASP recommends the following,
Whenever possible ensure the cache-control HTTP header is set with no-cache, no-store, must-revalidate, private; and that the pragma HTTP header is set with no-cache.
As I wrote (in http://www.williamferreira.net/blog/2011/10/04/controle-de-cache-apache/) is best to use the file .htacces. However beware of the time you leave the contents in the cache.
Use:
Where: 604800 = 7 days
PS: This can be used to reset any header