Robert Granlund
asked on
htaccess file
I have asked this question before but it was for a windows server. What / how do you write an entry in the .htaccess file to leverage the browser cache? I want to add images, javascript and css to the browser cache
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If a browser is configured to cache (the default) it should already cache all the files you listed.
For html files, a server can influence if a page is not cached, or how long it is cached for. It can not force a browser to cache something if the browser is setup to not to cache.
For non-html files (javascript, images, css) you can't control anything dealing with caching on the browser side. Either the browser is configured to cache or not to cache.