Cache Buster

Developer

Focus Lab, LLC - Erik Reagan

3rd Party (Free)

452 downloads (last 90 days)

Creative Commons Attribution Non-Commercial No Derivatives Download v1.1.1

EE Version Support

  • ExpressionEngine 1.x
  • ExpressionEngine 2

Compatibility

If an item is crossed out, it might be untested, not applicable or incompatible. Contact the developer to be sure.

  • Updater
  • Multi Site Manager
  • Stand Alone Entry Form
  • Low Variables
  • Content Elements
  • Better Workflow
  • Matrix
  • Grid
  • Webservice
  • Publisher

Requirements

  • jQuery for the Control Panel

Add-On Type(s)

Plugin

Tags

Using ExpressionEngine’s CSS template provides a nice cache buster string of the most recent time the template was saved to the database. This is quite handy but still requires EE to process the template. This plugin will take a file path and use PHP to check the modification time returning a cache busting string like ExpressionEngine’s. This allows you to serve flat files from your server without having ExpressionEngine’s template parser run through the code first. It is very simple to use.

Usage

There are 2 parameters. One is required and the other is optional.

{exp:cache_buster file="/css/style.css"}

This will return

/css/style.css?v=1266264101

Where “1266264101” is the UNIX timestamp of the last time /css/style.css was saved to the server.

You can change the separator between the file and the timestamp with the use of separator=”” in the tag.

{exp:cache_buster file="/css/style.css" separator="?"}

This will return

/css/style.css?1266264101

Download Cache Buster

EE Support Downloads Add-On Version Release Date
2.2.0+ Download 1.1.1 May 27, 2013

Cache Buster Links

This entry was created March 26, 2010, 7:25 am.
This entry was last updated December 3, 2014, 11:21 am.

Disclaimer: Information about ExpressionEngine add-ons is provided as a service to you, the user, and every member of the ExpressionEngine community. devot:ee is not responsible if you hose, mangle, wreck, or otherwise destroy your EE website by installing an add-on that you found out about at this site, regardless of its rating, Favorites status, commercial or free status, or general popularity. Caveat EEmptor!

Returns: devot:ee has a 30-day return policy on all commercial add-ons sold through devot-ee.com. If you need to return an add-on, do not go to the developer or the developer's site, but rather visit our returns page at https://devot-ee.com/returns to initiate your return. If you have questions, email support@devot-ee.com.

5 Reviews:

Rick Lecoat 04.17.15

Rick Lecoat
Rating - {addon_rating_average}

I just stumbled upon this fantastic little add-on. With all my CSS being written in SASS and precompiled into a single compressed file, I don’t use EE’s css templates at all. That being the case, this provides exactly the cache-busting solution I need, with zero bloat. Fantastic!

Ryan Masuga 09.10.14

Ryan Masuga
Rating - {addon_rating_average}

Sometimes we don’t need all the bells and whistles that Minimee brings, because we’re already minifying and compressing our CSS and JS, so this simple plugin is all we need to make sure the latest versions of our JS/CSS files are retrieved.

John Bacon 10.29.12

John Bacon
Rating - {addon_rating_average}

Works as advertised and where other plugins haven’t. A staple on our site.

Jannis Gundermann 08.23.11

Jannis Gundermann
Rating - {addon_rating_average}

This plugin works great, I can highly recommend it.

It should also be noted that this will also work with your JavaScript files not just CSS files.

Doug Avery 01.27.11

Doug Avery
Rating - {addon_rating_average}

Great implementation of a great idea. A++++ would download again!