---
schema_version: "1"
id: b69d57853b154cc1fd1da08352f49966024cad2816109b5d5d509034afc51048
title: Update Visualforce Markup for Lightning Experience
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/lex_prepare_vf.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.lex_prepare_vf.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: e92a8f8390e3be73dffb78a66b04da9d4a130a74494c5c1856a0b5fcb5062dc3
description: Some Visualforce pages may need tweaking to work in Lightning Experience. Don’t worry if you don’t have Visualforce experience—the workarounds show you exactly what to do each step of the way. Always test your Visualforce page in Lightning Experience first—most work as-is. If the listed issue is preventing the page from working properly, follow the instructions to tweak the markup and make it work. If a Visualforce page requires significant refactoring, move it to a Lightning component.
products:
  - Salesforce Platform
  - Cross Cloud
release: "264"
---
# Update Visualforce Markup for Lightning Experience

Some Visualforce pages may need tweaking to work in Lightning Experience. Don’t worry if you don’t have Visualforce experience—the workarounds show you exactly what to do each step of the way. Always test your Visualforce page in Lightning Experience first—most work as-is. If the listed issue is preventing the page from working properly, follow the instructions to tweak the markup and make it work. If a Visualforce page requires significant refactoring, move it to a Lightning component.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Group</strong>, <strong>Professional</strong>, <strong>Enterprise</strong>, <strong>Performance</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions</td></tr></tbody></table>

- **[Reconfigure iframe Components](https://help.salesforce.com/s/articleView?id=xcloud.lex_prepare_vf_iframe.htm&release=264.0.0&type=5)**  
    When a URL is displayed in an inline frame (iframe) on a Visualforce page, it can cause errors in Lightning Experience. Sometimes your URL looks different than you want, or maybe the whole page doesn't load in Lightning Experience. Most iframes are compatible with Visualforce in Lightning Experience. However, if you preview your Visualforce page in Lightning Experience and don't like what you see, you can usually fix it.
- **[Replace the window.location Method](https://help.salesforce.com/s/articleView?id=xcloud.lex_prepare_vf_window.htm&release=264.0.0&type=5)**  
    The window.location variable is a JavaScript method used to redirect the browser to a new page. JavaScript code in a Visualforce page that sets window.location directly isn't compatible with Lightning Experience. That's the bad news. The good news is that sforce.one navigation methods do the same thing, and are compatible with Lightning Experience.
- **[Replace Static URLs](https://help.salesforce.com/s/articleView?id=xcloud.lex_prepare_vf_href.htm&release=264.0.0&type=5)**  
    Lightning Experience doesn't support the use of static URLs to link to Salesforce resources. Fortunately, there's a much better alternative that future proofs your URLs. URLFOR is a function that calculates a URL based on inputs, rather than relying on something static that can't change. Use the URLFOR function with the appropriate action instead of direct URLs.
- **[Apply Lightning Stylesheets to Visualforce Pages Manually](https://help.salesforce.com/s/articleView?id=xcloud.lex_prepare_vf_styling.htm&release=264.0.0&type=5)**  
    With Lightning stylesheets, it’s easy to tweak your existing Visualforce pages so they’ll display with classic styling in Salesforce Classic and Lightning styling in Lightning Experience.