Protect Your Visualforce Pages with Cross-Origin Opener Policy (COOP)
Help shield your custom Visualforce pages from external attacks. When you enable
Cross-Origin Opener Policy (COOP), each top-level custom Visualforce page opens in a new browsing
context group. This process prevents direct access between other browser tabs and your Visualforce
page and the page’s content.
Required Editions
Available in: both Salesforce Classic and
Lightning Experience
Available in: Contact Manager, Group, Professional,
Enterprise, Performance, Unlimited, and Developer
Editions
User Permissions Needed
To modify session security settings:
Customize Application
COOP helps to shield your Visualforce pages from cross-site scripting (XSS), a type of
security vulnerability. With XSS, an attacker includes malicious code in a client-side script in
a legitimate web page or web application. When a user visits the page or application, the web
page or application delivers the malicious script to the user’s browser.
With COOP, each top-level custom Visualforce page opens in a new browsing context group.
Browser content that your Visualforce page opens within an iframe can access the parent page.
However, processes that attempt to open your page in a new tab or pop-up window can’t access the
page for potential cross-origin attacks.
Note To preserve your users’ access to required content, we recommend that you review the
expected behavior and test COOP in a sandbox before you enable this feature in
production.
Browser access checks use the headers for both your Visualforce page and the
external sites that you access from your page. The combination of Cross-Origin Opener Policy
(COOP) and Cross-Origin Embedder Policy (COEP) headers determines whether the Visualforce page
and external sites can interact. To learn more about COOP and COEP, we recommend these topics
on MDN Web Docs: Cross-Origin-Opener-Policy and Cross-Origin-Embedder-Policy.
From Setup, in the Quick Find box, enter Session Settings, and then
click Session Settings.
In the Visualforce Cross-Origin Security Headers section, select Cross-Origin
Opener Policy (COOP).
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required Cookies
Always Active
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional Cookies
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising Cookies
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.