Print this page

Summer '15 - Serve Static Resources from the Visualforce Domain

Knowledge Article Number 000213971
  • This critical update changes the way that your static resources, such as images, JavaScript, and CSS files, are served from Salesforce.
  • To avoid broken references to static resources, make sure that you review our recommended best practices.
  • Prior to this Summer '15, some static resources, such as images and CSS files, were loaded from the Salesforce Domain.
  • With this update, all static resources are loaded from the Visualforce Domain. 
  • Changing the origin domain can cause absolute references to static resources to break.
  • It’s a best practice to reference static resources by using the $Resource global variable and the URLFOR() function instead of static strings.

For example:
• <apex:includeScript value="{!$Resource.MyJavascriptFile}"/>

• <apex:image url="{!URLFOR($Resource.TestZip, 'images/Bluehills.jpg')}" width="50"

These references are safe to use regardless of your organization’s settings.
We recommend that you test this update in a sandbox or Developer Edition organization to verify correct behavior of your pages before enabling it in your production organization.

To activate this critical update:
1. From Setup, click Critical Updates.
2. Click Activate for “Serve Static Resources from the Visualforce Domain.”

Reference: See Serve Static Resources from the Visualforce Domain for more information.

promote demote