---
schema_version: "1"
id: 4b4b1fdc2c3f29dc921d61bd32bb5e89469ca8a764869bbc7e62c465f9682556
title: Use the immediate Attribute Carefully
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/salesforce-pages-developers-guide/guides/pages/best-practices/best-practices-performance/pages-best-practices-perf-immediate-attr.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-pages-developers-guide/guide/pages-best-practices-perf-immediate-attr.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 714cc5d788bbe47de7729ea884f7cc7c4e02d29234d2da23c9ed89d2d920f525
products:
  - Visualforce Developer Guide
  - Platform Developer Content
---

# Use the immediate Attribute Carefully

Visualforce components with the `immediate` attribute set to `true` execute an action without processing any validation rules for the associated fields on the page. This attribute should only be used if the component executes an action that navigates away from the page after completion.

Functional problems occur when the component behavior includes more than basic navigation functionality. Because `immediate="true"` doesn’t update the page's data model, the page's data model won't reflect any changes made during the action. This discrepancy can cause undefined behavior and possible data corruption.

Use of the `immediate` attribute is recommended only for cancellation actions. The following example shows an appropriate use of this attribute. When the user clicks **Cancel**, the `<apex:CommandLink>` component immediately performs `cancelApplication` without requiring the user to fix validation errors.

```apex
<apex:CommandLink action="{!cancelApplication}" value="Cancel" styleClass="btn" id="btnCancel" immediate="true">
```

