Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

The availability of features may depend on your plan type. Contact your Customer Success Manager if you have any questions.

Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Backend Proxy

Backend Proxy is another method of implementing Optimizely Performance Edge.

Backend Proxy is another method of implementing Optimizely Performance Edge.

It is not recommended as it usually leads to much poorer performance than implementing via Edge Subdomain or CDN proxy.

This is because the backend system serving as the proxy usually does not have the geographical proximity to your site visitors that a CDN or our Edge Worker does and can lead to requests taking much longer.

However, prior to the release of Edge Subdomain, this was an alternative for customers who couldn’t set up their CDN to proxy Optimizely Performance Edge requests.

Here's how it works:

  1. Visitor requests your webpage, which includes a script request. The script tag can either be:
  • first party — e.g. reference a relative path such as /optimizely-edge/<project_id>.js
  • third party — e.g. referencing a different origin subdomain.customer.com/optimizely-edge/<project_id>.js

🚧

Note

If the using a third-party origin, you’ll need to add the following as an attribute on your script tag:
referrerpolicy="no-referrer-when-downgrade"

This referrerpolicy attribute is required to enable Optimizely Performance Edge to receive the referrer for page targeting purposes.

Starting in Chrome 85, Chrome will default to using the strict-origin-when-cross-origin referrer policy which would prevent Optimizely Performance Edge from getting the full URL of the page the visitor is viewing. Other browsers have indicated they plan to follow Chrome’s lead in this as well. Setting the referrer policy to the current default no-referrer-when-downgrade resolves this. Learn more about these referrer policies.

  1. Your backend should be configured to automatically fetch requests matching with /optimizely-edge/<project_id>.js from the Optimizely Edge Decider API (see the Settings tab in your Optimizely Performance Edge project for the literal value for a given project).

  2. Optimizely Performance Edge Worker fetches the project or snippet datafile, evaluates URL targeting, makes decisions on any relevant experiments, and generates JavaScript (the microsnippet) that will apply changes for the selected variations, and inject the full snippet to be loaded asynchronously on the page.

  3. Optimizely Performance Edge Worker returns the microsnippet to your backend, which returns it as the response body of the script request.