Support » Plugin: Prevent Browser Caching » Dashboard File Cache Busting

  • I need a cache buster that works in the admin area only or that works for site admins when they first login to a site. Does this plugin force web browsers to clear cached WordPress admin area files and can I set it to work once only per initial session login?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author kostyatereshchuk


    Hi Lee,

    By default, this plugin does not change the assets (CSS, JS) version in the admin area because it may occur some issues in some plugins.

    But to do it you can paste this code in the functions.php file of your theme:

    add_action( 'admin_init', function() {
        prevent_browser_caching( array(
            'assets_version' => time()
        ) );
    } );

    Please let me know if it will work for you.

    Thank you

    Plugin Author kostyatereshchuk


    Marking as resolved for now.

    Hi Kostya,

    I’ve experienced the problem when tried to reset cache from toolbar from the admin area.

    So the code below fixes this issue:
    add_action( 'admin_init', array( $this, 'update_css_js' ), 10000 );
    in the ‘class-prevent-browser-caching.php’ file

    Could you add it to the newest version?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Dashboard File Cache Busting’ is closed to new replies.