0

Can some one please explain this. What changes eill it make .When activated, this 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 the Winter ’15 release, some static resources, such as images and CSS files, were loaded from the Salesforce Domain. This update changes that behavior so that all static resources are loaded from the Visualforce Domain. This change to 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: These references are safe to use regardless of your organization’s settings for this Critical Update. 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: From Setup, click Critical Updates. Click Activate for “Serve static resources from Visualforce Domain.”

1

Some people use static resources using the URL of the file. For eg. You have a jQuery file as a static resource. When you click on the "View File" link on the static resource link, the file will be opened in another tab(In chrome). People use that link which is something like this:
<img src ="https://cs2.salesforce.com/resource/1407424378000/jQueryFile" />
If you notice, the source URL of the file is loaded from Salesforce domain. The above explanation by Salesforce ask you not to use the hardcoded static resource URLs instead use the $Resource.StaticResourceName structure while adding the static resource to the page. This will load the static resource from the Visualforce page domain.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.