---
schema_version: "1"
id: 0b867bea4a08977aac77e7292f32d0fec989015a4ca73bd6f07aecb8f244fd65
title: Order of Execution for Visualforce Page Get Requests
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-get-request.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-pages-developers-guide/guide/pages-controller-get-request.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 7296385ab21cb6f26af2745f5314edd9590a11d9033f29f5ef12e94fa16cc0ce
products:
  - Visualforce Developer Guide
  - Platform Developer Content
---

# Order of Execution for Visualforce Page Get 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. The following diagram shows how a Visualforce page interacts with a controller extension or a custom controller class during a get request:

![A diagram of how a Visualforce page interacts with a controller extention or a custom controller class during a get request](https://developer.salesforce.com/media/salesforce-pages-developers-guide/get_request.png)

In the diagram above the user initially requests a page, either by entering a URL or clicking a link or button. This initial page request is called the get request.

1.  The constructor methods on the associated custom controller or controller extension classes are called, instantiating the controller objects.
2.  If the page contains any custom components, they are created and the constructor methods on any associated custom controllers or controller extensions are executed. If attributes are set on the custom component using expressions, the expressions are evaluated after the constructors are evaluated.
3.  The page then executes any `assignTo` attributes on any custom components on the page. After the `assignTo` methods are executed, expressions are evaluated, the `action` attribute on the `<apex:page>` component is evaluated, and all other method calls, such as getting or setting a property value, are made.
4.  If the page contains an `<apex:form>` component, all of the information necessary to maintain the state of the database between page requests is saved as an encrypted view state. The view state is updated whenever the page is updated.
5.  The resulting HTML is sent to the browser. If there are any client-side technologies on the page, such as JavaScript, the browser executes them.

As the user interacts with the page, the page contacts the controller objects as required to execute action, getter, and setter methods.

Once a new get request is made by the user, the view state and controller objects are deleted.

**note:** If the user is redirected to a page that uses the same controller and the same or a proper subset of controller extensions, a postback request is made. When a postback request is made, the view state is maintained.

If the user interaction requires a page update, such as when the user clicks a **Save** button that triggers a save action, a postback request is made. For more information on postback requests, see [Order of Execution for Visualforce Page Postback Requests](https://developer.salesforce.com/docs/platform/salesforce-pages-developers-guide/guide/pages-controller-postback-request.md).

For a specific example of a get request, see [Order of Execution Example](https://developer.salesforce.com/docs/platform/salesforce-pages-developers-guide/guide/pages-controller-lifecycle-example.md).

