not able to enable browser caching of static assets
|
08-23-2011, 05:11 PM
Post: #3
|
|||
|
|||
RE: not able to enable browser caching of static assets
Hi
I have two platform on my site drupal and vbulletin. vbulletin forum is hosted on mysite.com/forum We are further using rack space cloud for cdn and host images and css / jss files on cdn. So structure is like this mysite.com/forum - main website forum rscdn.com - rackspace cdn mysitestatic.com - cookiless domain now with using cname cdn.mysitestatic.com points to rscdn.com and i replace ursl at my mainsite.com/forum with cdn.mysitestatic.com ++++++++++++++++++++ .htaccess at mysite.com --------- # Requires mod_expires to be enabled. <IfModule mod_expires.c> # Enable expirations. ExpiresActive On # Cache all files for 2 weeks after access (A). ExpiresDefault A1209600 <FilesMatch \.php$> # Do not allow PHP scripts to be cached unless they explicitly send cache # headers themselves. Otherwise all scripts would have to overwrite the # headers set by mod_expires if they want another caching behavior. This may # fail if an error occurs early in the bootstrap process, and it may cause # problems if a non-Drupal PHP file is installed in a subdirectory. ExpiresActive Off </FilesMatch> </IfModule> ++++++++++++ .htaccess at mysitestatic.com ----- # Speed up caching FileETag MTime Size ExpiresByType image/jpeg A1814400000 ExpiresByType image/gif A1814400000 ExpiresByType image/png A1814400000 ExpiresByType image/x-icon A1814400000 ExpiresByType text/plain A1814400000 # Good for one week ExpiresByType application/x-javascript M604800 ExpiresByType text/css M604800 ExpiresByType text/html M604800 # Expires ExpiresActive On ExpiresDefault "access plus 366 days" # Future Expires Headers <filesmatch ".(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$"> Header set Expires "Sat, 27 Dec 2015 23:59:59 GMT" </filesmatch> |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
not able to enable browser caching of static assets - deep-blue - 08-22-2011, 03:33 PM
RE: not able to enable browser caching of static assets - pmeenan - 08-23-2011, 06:40 AM
RE: not able to enable browser caching of static assets - deep-blue - 08-23-2011 05:11 PM
RE: not able to enable browser caching of static assets - pmeenan - 08-23-2011, 11:42 PM
|
User(s) browsing this thread: 1 Guest(s)