WordPress.org

Plugin Directory

Test out the new Plugin Directory and let us know what you think.

Add Headers

Adds the ETag, Last-Modified, Expires and Cache-Control headers to HTTP responses generated by WordPress. [DEPRECATED]

NOTICE: THIS PLUGIN HAS BEEN DEPRECATED. IT IS NO LONGER SUPPORTED. IT IS NO LONGER TESTED WITH NEW WORDPRESS RELEASES. USING IT IN PRODUCTION IS NOT RECOMMENDED.

IT IS STRONGLY SUGGESTED TO MIGRATE TO OTHER MORE MODERN AND BETTER MAINTAINED PLUGINS.

IF YOU ARE STARTING A NEW BLOG, IT IS HIGHLY RECOMMENDED TO SEARCH FOR OTHER PLUGINS IN ORDER TO AVOID THE INEVITABLE FUTURE MIGRATION.

REGARDING EXISTING USERS, AT THE TIME OF WRITING, THERE ARE NO MAJOR BUGS. PROVIDED THAT THE WORDPRESS API DOES NOT CHANGE SOON, YOU HAVE THE TIME TO EXPERIMENT WITH OTHER PLUGINS AND PLAN YOUR MIGRATION.

Changelog Entries

Please check out the changelog of each release by following the links below. You can also check the roadmap regarding future releases of the plugin.

  • 2.0.1
  • 2.0.0
    • IMPORTANT CHANGE OF THE DEFAULT FUNCTIONALITY: Since the v2.0.0 major release, no page is allowed to be cached by default. Caching needs to be enabled by configuring the plugin.
    • Improved the header generation mechanism. New header array format: ['HEADER_NAME'] => 'HEADER_VALUE'
    • Added the remove_pre_existing_headers option. When enabled, it instructs the plugin to clear any preexisting ETag, Last-Modified, Expires, Cache-Control and Pragma headers before sending its own headers, according to the user defined options.
    • Other minor fixes and improvements.
  • 1.2.1
    • Instead of Pragma: cache, now sends Pragma: public. This is not included in any standard. The public value is used by convention.
    • The array that holds the headers just before sending them to the clients now has proper keys for easier header isolation when filtering.
    • Fixed a small bug that happened whenever a taxonomy archive without any posts was visited.
  • 1.2.0
    • New option added: cache_max_age_seconds_for_authenticated_users initially set to 0 seconds. If you need cached content for authenticated users, adjust this accordingly.
    • The Pragma header is now also sent with a value of no-cache or cache according to Cache-Control header's max-age.
  • 1.1.2
  • 1.1.1
    • Bug fix: In 1.1.0 two new filters had been added with wrong prefix in their names. This has been fixed in 1.1.1.
  • 1.1.0
  • 1.0.5
  • 1.0.4
  • 1.0.3
  • 1.0.2
  • 1.0.1

Requires: 3.1.0 or higher
Compatible up to: 4.5.4
Last Updated: 2 months ago
Active Installs: 3,000+

Ratings

5 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1 100,1,1
100,1,1 100,1,1
100,1,1
100,2,2
100,1,1 100,2,2 100,1,1 100,1,1 100,1,1
100,2,2
100,2,2
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1 100,1,1 100,2,2
100,1,1
100,1,1
100,1,1