Skip to main content

z3c.hashedresource

While we want browsers to cache static resources such as CSS-stylesheets and JavaScript files, we also want them not to use the cached version if the files on the server have been updated. (And we don’t want to make end-users have to empty their browser cache to get the latest version. Nor explain how to do that over the phone every time.)

To make browsers update their caches of resources immediately when the resource changes, the absolute URLs of resources can now be made to contain a hash of the resource’s contents, so it will look like /++noop++12345/@@/myresource instead of /@@/myresource.

In developer mode the hash is recomputed each time the resource is asked for its URL, while in production mode the hash is computed only once, so remember to restart the server after changing resource files (else browsers will still see the old URL unchanged and use their outdated cached versions of the files).

To use this package, include its configure.zcml and use z3c.hashedresource.interfaces.IHashedResourceSkin or a skin that inherits from it.

The dependency on zope.app.publisher >= 3.8.2 is not longer declared explicitly in order to gain compatibility with Zope2, but it is still required when using Zope3.

CHANGES

1.1.3 (2011-09-05)

  • Removed unused (and broken) import.

1.1.2 (2009-09-13)

  • Restored compatibility with Python 2.4 by importing hashlib conditionally.

1.1.1 (2009-08-25)

  • Using haslib instead of md5 get rid of deprecation warnings with Python 2.6

1.1 (2009-07-27)

  • Added compatibility with Zope2. The dependency on zope.app.publisher >= 3.8.2 is not longer declared explicitly, but still required when using Zope3.

  • Some code and test clean-ups.

1.0 (2009-06-16)

  • first released version

Release files for z3c.hashedresource 1.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for z3c.hashedresource 1.1.3
File Size Uploaded
z3c.hashedresource-1.1.3.tar.gz 8.1 kB Details

Release files / z3c.hashedresource-1.1.3.tar.gz

Download URL z3c.hashedresource-1.1.3.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
4370d65929e7f8ed5a57ca364515dac9a6887ebe0ff9dbebab7e61999725c837
BLAKE2b-256 checksum
How to use checksums
fd5b48d7eddb6c4c927f73344954df79904b32ed1d7c2d9a36a45882e12e9533
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.1.3 This release

1 release file

1.1.2

1 release file

1.1.1

1 release file

1.1

1 release file

1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page