HTTP Header

Developer

Rob Sanchez

3rd Party (Free)

811 downloads (last 90 days)

Download v1.1.2

EE Version Support

  • ExpressionEngine 2
  • ExpressionEngine 3

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

Set the HTTP Headers for your template.

Parameters

  • status - set an HTTP Status code
  • location - set a location for redirection
  • content_type - set a Content-Type header
  • charset - set a charset in the Content-Type header
  • content_disposition - set a Content-Disposition header (ex: attachment) with a filename
  • content_language - set a Content-Language header
  • cache_seconds - set to a non-zero number to set caching headers; set to 0 to force no-cache
  • terminate - set to “yes” to prevent any other output from the template
  • vary - set a Vary header
  • access_control_allow_origin - set a Access-Control-Allow-Origin header

Examples

Do a 301 redirect

{exp:http_header status="301" location="{path=site/something}" terminate="yes"}

Set a 404 Status header

{exp:http_header status="404"}

Set the Content-Type header to application/json

{exp:http_header content_type="application/json"}

Set Content-Disposition to force the download

{exp:http_header content_disposition="attachment" filename="myfile.xml"}

Set the Pragma, Cache-control, and Expires headers to set a 5 minute (300 second) cache

{exp:http_header cache_seconds="300"}

Set the Content-Language header to “en”

{exp:http_header content_language="en"}

Set the Vary header to User-Agent

{exp:http_header vary="User-Agent"}

Set the Access-Control-Allow-Origin header to allow all

{exp:http_header access_control_allow_origin="*"}

Download HTTP Header

EE Support Downloads Add-On Version Release Date
Not Specified Download 1.1.2 Jun 17, 2016

HTTP Header Links

This entry was created March 14, 2011, 11:39 am.
This entry was last updated June 18, 2016, 12:16 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.

2 Reviews:

Alex Kendrick 07.15.14

Rating - {addon_rating_average}

Another useful add-on by Rob Sanchez!

BT 02.01.14

Rating - {addon_rating_average}

Any chance an option for the Vary response can be added? i.e., Vary: User-Agent ?