MyBB Internal: One or more warnings occured. Please contact your administrator for assistance.
WebPagetest Forums - not able to enable browser caching of static assets

WebPagetest Forums

Full Version: not able to enable browser caching of static assets
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

I have enabled ExpiresOn in .htaccess in my server but still all images are showing expiry time as few minutes.

I am hosted on apache server
Can you post the section of the .htaccess that deals with expiration times and a link to the test results? Just turning on expires isn't enough, you need to set a time (by mime type/whatever)

I have two platform on my site drupal and vbulletin. vbulletin forum is hosted on

We are further using rack space cloud for cdn and host images and css / jss files on cdn.

So structure is like this - main website forum - rackspace cdn - cookiless domain

now with using cname points to

and i replace ursl at my with
.htaccess at

# 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

.htaccess at
# 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"
If you access the resources directly instead of through the CDN do you see the correct headers or also the shorter expiration? Some CDN's allow you to override the expires times and some will return the "remaining freshness" from when they last fetched the content so eliminating the CDN from the picture will help at least track down the issue.

As a sanity check, is apache configured to allow for .htaccess overrides on your static site? Otherwise the rules might be ignored entirely.
Reference URL's