|
Previous Page |
Solar_App_Base |
Next Page |
_redirectNoCache()
Redirects to another page and action after disabling HTTP caching.
Inherited from Solar_Controller_Page.
Parameters
- (Solar_Uri_Action|string)
$spec: The URI to redirect to. - (int|string)
$code: The HTTP status code to redirect with; default is '303 See Other'.
Returns
- (void)
Description
Redirects to another page and action after disabling HTTP caching.
The _redirect() method is often called after a successful POST operation, to show a "success" or "edit" page. In such cases, clicking clicking "back" or "reload" will generate a warning in the browser allowing for a possible re-POST if the user clicks OK. Typically this is not what you want.
In those cases, use _redirectNoCache() to turn off HTTP caching, so that the re-POST warning does not occur.
This method sends the following headers before setting Location:
<?php
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
?> Local
- Overview
- Constants
- Properties
- Methods
- __construct()
- __destruct()
- __get()
- __set()
- _addViewHelpers()
- _addViewTemplates()
- _exception()
- _exceptionDuringFetch()
- _forward()
- _forwardActionMethod()
- _getActionFormat()
- _getActionMethod()
- _getActionView()
- _info()
- _isProcess()
- _load()
- _postAction()
- _postRender()
- _postRun()
- _preAction()
- _preRender()
- _preRun()
- _query()
- _redirect()
- _redirectNoCache()
- _render()
- _renderLayout()
- _renderView()
- _setContentType()
- _setLayoutTemplates()
- _setViewObject()
- _setup()
- actionError()
- apiVersion()
- display()
- dump()
- fetch()
- locale()
- setFrontController()