Force Refresh is a lightweight WordPress plugin born out of a simple necessity: the ability to force a user to refresh their browser on single-page applications. For GivingToHoosDay, fundraising progress was done asynchronously — meaning that users didn’t have to manually refresh their browser to view updated information. This presented a problem for us in the event we discovered a bug in our large front-end assets. Since users were not conditioned to refresh their browser throughout the day, we didn’t have a way for their browser to load new assets.
Out of this problem, Force Refresh was born. It allowed us to to request a browser refresh itself by simply assigning a hexadecimal representation of the site’s version based on the current time. Browsers, then, would periodically check to see if the stored site version corresponded to the current site version and, if not, refresh the page.