Enable browser caching of static assets
|
09-13-2010, 02:28 AM
(This post was last modified: 09-13-2010 02:30 AM by jabubo.)
Post: #2
|
|||
|
|||
RE: Enable browser caching of static assets
Try to add something like this, to an .htaccess file in the root-Folder of your website.
The settings add the expire header for the mime-types (Javascript, CSS, png, jpg and so on) beginning at the time the client access the file and adding the time specified as expiration time. In the code below A604800, stands for accesstime + 604800 seconds is the expiration time. In this time the client do not request the content again. Unless the client uses a local cache. Code: <IfModule mod_expires.c> Just check the HTTP-Header of any file mathing this. If the expire-header is not used, your provider has not enabled mod_expires for the Apache webserver. Ask him to do that. test and execute PHP functions online free and easy => http://www.functions-online.com/home.html |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Enable browser caching of static assets - yzerfontein - 09-13-2010, 02:11 AM
RE: Enable browser caching of static assets - jabubo - 09-13-2010 02:28 AM
RE: Enable browser caching of static assets - yzerfontein - 09-13-2010, 02:58 AM
RE: Enable browser caching of static assets - pmeenan - 09-13-2010, 12:30 PM
RE: Enable browser caching of static assets - microapp - 09-27-2011, 09:37 PM
RE: Enable browser caching of static assets - pmeenan - 09-28-2011, 10:36 AM
|
User(s) browsing this thread: 1 Guest(s)