
Filename based cache busting for WordPress scripts/styles using last modified date.
Stop telling clients or users to hard refresh / shift refresh. The url to all of the css/js files on your site will change automatically whenever the files are modified. You can set proper long cache lifetimes to help get top scores on Google Pagespeed without running into cached css/javascript problems.
Based on this gist https://gist.github.com/ocean90/1966227 from Dominik Schilling, I’ve enhanced it by automatically replacing the asset version with the files modification time and automatically editing htaccess – making it install + forget.
Includes querystring option as a fallback – which works in more scenarios.
The plugin should add what it needs to your .htaccess file jsut like WP itself. But if for any reason that doesn’t work for you – here’s what it adds:
# FBACB <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.+)\.([0-9\.]+)\.(js|css)$ $1.$3 [L] </IfModule> # still fbacb <IfModule mod_expires.c> ExpiresActive on ExpiresByType text/css "access plus 1 year" ExpiresByType application/javascript "access plus 1 year" </IfModule> # END FBACB location ~* ^(.+)\.(?:\d+)\.(min.js|min.css|js|css)($|\?.*$) { try_files $uri $1.$2; } Some webhosts need a bit of custom config to get the filename based urls working.
To work on WP-Engine, you’ll need the following redirect added via my.wpengine -> installname -> Redirect rules
Source: ^(.+)\.([0-9\.]+)\.(js|css)$ Dest: $1.$3 Type: break (this is under advanced)
Just works.
Just works.
If your webserver is failing to serve assets using url rewriting, the plugin attempts to serve them itsef (ie: via PHP). Obviously this is slow/less than ideal in production (it’ll be much slower) – so you should configure your web server correctly to serve the files. If you see this HTTP header “FBACB-Php-Fallback: yes” on your assets, this applies to you.
Note that hosts are increasingly configured to serve css/js directly from disk and won’t fall back to PHP + WordPress error handling – this fallback then won’t work.
Starting from $0 per month.
Rating
Reviewers
5 reviews
Tags
Developed By
benlumley
Quick & Easy
Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!
Testimonial plugins for Wordpress
Galleries plugins for Wordpress
SEO plugins for Wordpress
Contact Form plugins for Wordpress
Forms plugins for Wordpress
Social Feeds plugins for Wordpress
Social Sharing plugins for Wordpress
Events Calendar plugins for Wordpress
Sliders plugins for Wordpress
Analytics plugins for Wordpress
Reviews plugins for Wordpress
Comments plugins for Wordpress
Portfolio plugins for Wordpress
Maps plugins for Wordpress
Security plugins for Wordpress
Translation plugins for Wordpress
Ads plugins for Wordpress
Video Player plugins for Wordpress
Music Player plugins for Wordpress
Backup plugins for Wordpress
Privacy plugins for Wordpress
Optimize plugins for Wordpress
Chat plugins for Wordpress
Countdown plugins for Wordpress
Email Marketing plugins for Wordpress
Tabs plugins for Wordpress
Membership plugins for Wordpress
popup plugins for Wordpress
SiteMap plugins for Wordpress
Payment plugins for Wordpress
Coming Soon plugins for Wordpress
Ecommerce plugins for Wordpress
Customer Support plugins for Wordpress
Inventory plugins for Wordpress
Video Player plugins for Wordpress
Testimonials plugins for Wordpress
Tabs plugins for Wordpress
Social Sharing plugins for Wordpress
Social Feeds plugins for Wordpress
Slider plugins for Wordpress
Reviews plugins for Wordpress
Portfolio plugins for Wordpress
Membership plugins for Wordpress
Forms plugins for Wordpress
Events Calendar plugins for Wordpress
Contact plugins for Wordpress
Comments plugins for Wordpress
Analytics plugins for Wordpress
Common Ninja Apps
Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.
Showcase images with an image carousel that rotates or slides visuals, improves design, and draws attention to key content.
Detect ad blockers on your site to maintain visibility into user behavior and support sustainable ad-based monetization.
Add an Instagram slider to your site to display social posts dynamically and keep your visual content engaging and current.
Add charts and graphs to your site to present data clearly, help visitors understand insights faster, and support more confident decision making.
Add a translation widget to your site so users can switch languages easily and access content in their preferred language.
Use an age verification popup to validate visitor age, meet regulatory requirements, and ensure only eligible users access restricted content.
Use a support form that lets customers submit tickets, saves each request, sends notifications, and helps you manage support more efficiently.
Run engaging public voting contests that showcase products and crown a winner
Show posts in an X feed that keeps updates visible, improves content discovery, and helps visitors stay engaged with your latest activity.
Marketing button with text and an icon that highlights key offers, draws attention to promotions, and helps increase engagement and conversions.
Collect user insights with a feedback form that gathers valuable input, improves user experience, and helps you understand visitor needs more clearly.

Show YouTube videos in a customizable YouTube feed that keeps content fresh, boosts watch time, and helps visitors explore more of your channel.
More plugins
The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!
