CSS not updating on live server but works on development environment

April 27, 2016 925 views
Apache Caching

Usually, some images are cached. My Yii app has some caching but not usually for CSS that I know of. I made the CSS changes and could see the changes take effect on my local development environment but not on live server. I attached two photos of development environment that has the black font and updated navigation bar and the live site that is CSS changes aren't taking effect with the black font and the navigation bar. All I know what to do is wait and hope that it's changes take effect. I'm running Apache PHP MySQL and am the developer but didn't install the server and don't know what settings are on it to make the changes.

2 Answers

The first thing I would check is if the site is using a caching proxy service like CloudFlare. This would be set up in the domain's nameserver settings with the registrar. If a service like this is being used, changes will not appear until the current cache has expired.

Another possibility is that your ISP is doing some caching of their own and is maintaining a cached copy of the old content.

Thank you! That was it. I use CloudFlare and they were caching my CSS. I found they have a 'developer mode' that temporarily turns this off. Problem solved.

Have another answer? Share your knowledge.