Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have been using w3 Total Cache with the setting to enable Expires Headers and eTags but they are not being set.

I'm serving images and other media from a sub-domain such as static.example.org served by nginx but it didn't work even when I was serving these files with Apache from the main domain.

I've tried disabling and re-enabling the browser caching settings in the admin without success. What do you suggest?

share|improve this question

closed as off-topic by ialocin, birgire, G. M., Pieter Goosen, Johannes Pille Aug 24 at 11:36

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Your question should be specific to WordPress. Generic PHP/JS/HTML/CSS questions might be better asked at Stack Overflow or another appropriate site of the Stack Exchange network. Third party plugins and themes are off topic." – ialocin, birgire, G. M., Pieter Goosen, Johannes Pille
If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers 2

up vote 2 down vote accepted

do you have mod_expires installed and enabled in your apache module?

share|improve this answer
    
I think actually my setup is so barebones that I cannot even have a .htaccess of sorts. I'll have to put everything back on the same subdomain and make sure mod_expires is turned on. –  L. De Leo Nov 5 '10 at 16:12

If you are using Nginx to serve static content then you will need to manually add your expires headers to your Nginx server file.

Example:

location ~* \.(jpg|png|gif|jpeg|css|js|mp3|wav|swf|mov|doc|pdf|xls|ppt|docx|pptx|xlsx)$ {

                        expires 7776000;

                }
share|improve this answer
    
Should there not be a "s" after the number? It also seems that Nginx already can create the Nginx.conf file for you, but I still get the F for Expire Header Browser Cache settings: pastebin.com/UeW9sGjX –  rhand Dec 23 '12 at 5:09

Not the answer you're looking for? Browse other questions tagged or ask your own question.