---
schema_version: "1"
id: 2bdce9b3dead65dd295c922dae08a5a79f9f825237ac5cb8ac32f26c1962f650
title: Order of Execution in a Visualforce Page
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/salesforce-pages-developers-guide/guides/pages/controller/pages-controller-lifecycle.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-pages-developers-guide/guide/pages-controller-lifecycle.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: a95b48c64507e998b950cfe2e0d6addfbf59299209e026a486083f3c863bb20f
products:
  - Visualforce Developer Guide
  - Platform Developer Content
---

# Order of Execution in a Visualforce Page

When a user views a Visualforce page, instances of the controller, extensions, and components associated with the page are created by the server. The order in which these elements are executed can affect how the page is displayed to the user.

To fully understand the order of execution of elements on a Visualforce page, you must first understand the page's lifecycle–that is, how the page is created and destroyed during the course of a user session. The lifecycle of a page is determined not just by the content of the page, but also by how the page was requested. There are two types of Visualforce page requests:

-   A get request is an initial request for a page either made when a user enters an URL or when a link or button is clicked that takes the user to a new page.
-   A postback request is made when user interaction requires a page update, such as when a user clicks on a **Save** button and triggers a save action.

**note:** The maximum response size from a Visualforce page request must be below 15 MB.

-   **[Order of Execution for Visualforce Page Get Requests](https://developer.salesforce.com/docs/platform/salesforce-pages-developers-guide/guide/pages-controller-get-request.md)**  

-   **[Order of Execution for Visualforce Page Postback Requests](https://developer.salesforce.com/docs/platform/salesforce-pages-developers-guide/guide/pages-controller-postback-request.md)**  


    Learn how a Visualforce page interacts with a controller extension or a custom controller class during a postback request.

-   **[Order of Execution Example](https://developer.salesforce.com/docs/platform/salesforce-pages-developers-guide/guide/pages-controller-lifecycle-example.md)**  


    Follow the lifecycle of a Visualforce page. Learn how the order of execution differs when the user retrieves the page with a get request instead of a postback request.


