How Visualforce is Versioned
To aid backwards-compatibility, each Visualforce page and custom component is saved with version settings for the specified version of the API as well as the specific version of Visualforce. If the Visualforce page or component references installed managed packages, the version settings for each managed package referenced by the page or component is saved too. This ensures that as Visualforce, the API, and the components in managed packages evolve in subsequent versions, Visualforce pages and components are still bound to versions with specific, known behavior.
Custom components that are referenced in Visualforce pages always perform under their own version number. Thus, if a custom component is set at version 15.0, it always exhibits behavior from Visualforce version 15.0, whether running in a version 15.0 or a 16.0 page.
The release notes list changes between Visualforce versions. The component reference also lists which Visualforce version a standard component was introduced in, as well as whether a component or attribute was deprecated in a version.
How Visualforce Versions Relate to Salesforce API Versions
The version of a Visualforce page or component affects the version of the Salesforce API used by that page or component. A Visualforce page with a version of 16.0 uses Salesforce API version 16.0 internally, ensuring consistent behavior. However, this behavior is specific to the Visualforce framework and built-in components.
If your component makes use of external calls to Salesforce Platform APIs, such as the REST API, those calls are not versioned along with the component. The version of the call is embedded in the parameters of the call itself, usually the URL. It’s your responsibility to update the API used for external calls as needed.
Set the Version of a Visualforce Page or Component
To set the Salesforce API and Visualforce version for a Visualforce page or custom component:
- Edit a Visualforce page or component and click Version Settings.
- Select the Version of the Salesforce API. This is also the version of Visualforce used with the page or component.
- Click Save.