Cache Issue?

Not sure what I’m doing wrong. I’m unable to get the updated version of the CSS file on the live site. On development it shows just fine after running Grunt. But I’m unable to run Grunt on the server and didn’t think I needed to.

You can view the old CSS file here:
Do a search for “localhost”.

The newer file is located here:
No mention of “localhost”.

Check out the site itself and the source.


The default Gruntfile.js doesn’t have a task to upload the newly generated file(s) to your production server.

This means you will either need to add such a task, run Grunt on the server itself, add the files manually or use something like Capistrano to manage your deploys.

Our new WordPress Stack has Capistrano in-built and it’s well worth a look if your server meets the requirements.

Is there any reason why you have different files hosted at the domain root to the www?

For me to get SSH access on Websynthesis, I have to go through the client which is not ideal right now. I have another client that is not on their minimum of Pro as well that can’t get SSH access at all. So I can’t run Grunt nor Capistrano on the production server. I manually upload these files via sFTP into the server after running Grunt locally on my machine.

No idea why there are different files hosted on the domain root compared to www. It’s being uploaded to one location. It appears the www version is loading the older one while the root is the newer file.

I may have found the issue. They appear to be using CloudFlare. Going to get that disabled and find out if that changes anything.

Could be CloudFlare–you may need to set it to Development Mode for a while or disable caching altogether until you’ve finalized devops.

You might be able to just re-upload lib/scripts.php which will have had new script/style version numbers generated to prevent caching. I’d be curious to know if that works without the need to disable CloudFlare caching.

I’ve tried that as well. It does put the new version number but still takes the old CSS styles.