What to Do When Your Site Updates Aren’t Showing Up

www-questionsYou just spent the better part of of 3 hours updating your website’s styling or templates only to find that you can’t get the changes to show up in your browser. Even worse, your site visitors can’t see them either.

This can be an incredibly frustrating situation, but there are several things to try!

A Hard Refresh
Your first course of action is a hard refresh. This is different from a regular refresh because the hard refresh will force your browser to reload all of the files associated with that website.

Background: when you visit a website, your browser will save certain information to your local drive (usually the stylesheet, javascript files, and images) so that the next time you pull up that website, it will load faster. This generally makes the web a more user-friendly place to be, but when you’re trying to make updates, it can be a hassle.

A hard refresh will force the browser to pull all the files from the server instead of your local cache. On a PC, just press Control + F5. On a Mac, it will be Command + Shift + R.

If your changes show up, you know that they are at least active on the server, but that still doesn’t solve the problem of repeat visitors who have the site cached in their browsers. So how can you ensure that your visitors don’t pull up a cached version of your site files?

Change the Version Number
Ok, bear with me because this one’s a little harder. So the files that your browser is most likely to cache are external files that are called in your header. They’ll probably look like this:

<link rel=”stylesheet” type=”text/css” media=”all” href=”/style.css” />

or maybe

<script type=’text/javascript’ src=”/js/jquery.js”></script>

These are both files that need to be loaded in order for your page to display correctly. If you’ve made changes to one of these files, and those changes aren’t showing up for you until you hard refresh, you may want to consider changing the version number.

How do you do it? Just add “?v=2″ to the end of the file name so it looks like this:

<link rel=”stylesheet” type=”text/css” media=”all” href=”/style.css?v=2″ />

When a site visitor hits your site and your browser sees that “?v=2″ it will basically say, “Oh! We’ve never seen this before!” and load the stylesheet anew. Already have “?v=2″ at then end? Just go with “?v=3″ and so on.

Check Your Caching Plugin
Especially if you’re on WordPress, check to see if you have a caching plugin installed. Depending on your plugin, you will be able to delete the cache under Settings or maybe it has it’s own menu button on your sidebar. The purpose of these plugins is to save your site offline on your computer and your visitors’ computers to improve load time, so when you make changes, be sure to empty the cache!

Contact Your Hosting Provider
If you’ve tried all of the above, you may be facing a server issue. Get in touch with your hosting provider to let them know you’ve tried hard refreshing, changing the version number, and clearing your caching plugin (if you have one), and still aren’t seeing the changes. They may need to perform and cache clearing of their own!

Luckily, this last option is rarely needed.