Preview site without cache?

I have a WordPress site on a self-hosted domain. There is no cache plugins. I am using Firefox.

When I make changes to the CSS it can sometimes take hours for anything to change in the browser.

Read More

I use Plesk and its the same in the Plesk preview so the trick with a random hash and query doesn’t work either.

How to solve this please? I need to see live changes please.

Related posts

Leave a Reply

4 comments

  1. The way I get around this is to add a version to the css file that’s the time it has been changed last:

    <link rel="stylesheet" href="path/style.css?v=<?php echo filemtime("path/style.css"); ?>" type="text/css" />
    

    EDIT: Alternatively you could use a plugin that ultimately does the same thing: https://wordpress.org/plugins/stylecss-load-last-version/

    Note: these are solutions that will always load the most recent css file for all. If you only want to test, use the solution of @user3085741 (refresh the page).

  2. Another alternative when you are doing development would be to turn off caching in Firefox altogether:
    “Hamburger menu”->Preferences->Advanced->Network. Check the box that says “Override cache management” and limit the cache to 0 MB.

    This way no pages will be cached in Firefox until you decide to turn caching back on (just uncheck the override box you checked above).

    This won’t help if something else is doing the caching, like a proxy or the server itself.

    Hope this is helpful.