Skip to content

Instantly share code, notes, and snippets.

@opi
Created March 19, 2012 17:30
Show Gist options
  • Save opi/2120338 to your computer and use it in GitHub Desktop.
Save opi/2120338 to your computer and use it in GitHub Desktop.
Drupal (6) login & logout issue
/**
* Implements hook_init().
*/
function mymodule_init() {
// Override Drupal default header.
// See http://www.journeymm.com/blogs/drupal/drupal-loginlogout-caching-problem
// and http://sriramk.com/blog/2007/06/firefox-and-ie-deal-with-no-cache.html
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", FALSE);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment