lastModified

A simple snippet for dealing with browser caching.

Creator: Devin Gaul (demon.devin)

Need help installing this extra?

About lastModified

lastModified Extra for MODx Revolution

by daemon.devin PortableAppz.x10.mx/

When dealing with a browser's cache you can't be certain your viewers are getting the most recent copy of the files that make up the page they're looking at. This little snippet intends to remedy that by appending a GET value (in this case, the UNIX timestamp) to, for example, a cascading stylesheet, you can make the browser think the stylesheet is dynamic, thus reloading the file every time the modification date changes.

More information is available at the dedicated lastModified webpage

Information

Released
November 2, 2016

Supported Database
MySQL

License
GPLv2

Supported Versions
2.0 - <2.5

Downloads
965

Documentation
lastModified Documentation

Instructions

lastModified Extra for MODx Revolution

daemon.devin PortableAppz.x10.mx/

When dealing with a browser's cache you can't be certain your viewers are getting the most recent copy of the files that make up page their looking at. This little snippet intends to remedy that by appending a GET value (in this case, the UNIX timestamp) to, for example, a cascading stylesheet, you can make the browser think the stylesheet is dynamic, thus reloading the file every time the modification date changes.

More information is available at the dedicated lastModified webpage

PROPERTIES

&path | string | required -> path to the file to download with trailing slash &file | string | required -> filename of the document you wish to use

EXAMPLE

Specify a path &path=css/ and the file &file=style. See OUTPUT below for example.

Don't forget to use a trailing slash on &path

OUTPUT

New in 1.0.0-beta1

Changelog for lastModified

lastModified 1.0.0

  • Initial Version

Current releases

1.0.0-beta1
View | Download
November 2, 2016
2.0 - <2.5