- Understand the workflow followed by the Editor
- Troubleshoot and identify likely problems when page-loading errors occur in the Editor
Understanding the details of how Optimizely X loads pages in the Editor may help you determine exactly why your pages aren't loading in the Editor the way you expect them to. This article explains how the Editor loads pages, how it handles changes and reloading pages, and the general workflow Optimizely follows when it loads pages into the Editor.
Optimizely X tries loading pages over HTTP and HTTPS, with a timeout of 15 seconds for the page to register a “hello” message. If that timeout does occur, the pages are loaded over proxy.
Optimizely will then pre-load up to four pages in the Editor.
Handling changes and reloading pages
In Optimizely Classic, whenever you make changes in the Editor, Optimizely uses a clone of the DOM
<body> element for the initial pageload, and then resets the
The process is a bit different for Optimizely X. Optimizely keeps track of the changes you've made in a changelist. What happens next depends on the type of change you've just made:
If it's a visual change:
The changes are added to or updated in the changelist;
The changelist is sent down to the iFrame;
The previous changelist is undone, and the new changelist is applied in its place. This is possible because Optimizely stores the necessary information to undo all visual changes it applies.
If it's a custom code change:
Optimizely reloads the entire page and applies all your changes in order. This is required because it is not possible to “undo” a code change.
All changes execute in the order they appear in the sidebar, and each change will wait for the one immediately preceding it to complete before it executes. Changes currently cannot be re-ordered.
The Editor workflow: What's happening behind the scenes
innie.js- identifies the version of the Editor being used.
- Next, the production client loads the
p13n_inner.js has loaded, it fetches the Editor client from the app's backend (the production client is too lean to run in the Editor). The Editor client then requests the Editor data for the specific project you're working in, and is then initialized.
Troubleshoot Editor page-loading issues
If you see a warning that starts with "We have loaded your site using compatibility mode," you may be encountering an issue with mixed content. Follow the instructions in our article on enabling mixed content, then reload the page.
If the issue is loading pages that require session-specific information or logging in (like a shopping cart, intranet page, or password-protected content), check out this troubleshooting article.
If you're trying to load content that's in an iframe, read about loading iframe content.
If you use an X-Frame-Options header, consider switching to the newer Content Security Policies header.
Follow the steps in this article to troubleshoot other Editor page-loading issues.