After updating from winter 17 to spring 17 I am facing random issues with $Resource variable. This issue is observed:

  • Chrome
  • Firefox
  • Edge

and to my surprise everything works smoothly in IE11.

Issue Description:

  • I am using $Resource variable extensively to reference the resource prefix in stylesheet, script and image tags

  • Till Winter 17 everything works fine, but after upgrade it randomly started throwing 404 resource not found exception

  • When dived deeper it looks like "{!$Resource.zip_file}/Images/test.png" was resolved to "/Images/test.png" instead of "/resource/zip_file/Images/test.png"


<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >
        With $Resource: <br/>
        <img src="{!$Resource.prmsf__Pramata+'/Images/powered-by-pramata-logo.png'}" width="300"/>
        With /resource: <br/>
        <img src="/resource/prmsf__Pramata/Images/powered-by-pramata-logo.png" width="300"/>

In Winter 17:

enter image description here

In Spring 17:

enter image description here


  • This is observed consistently when the Cache Buster is enabled in chrome
  • Currently I modified the code to /resource instead of $Resource but I am curious to know long term fix since documentation doesn't support the former

enter image description here

  • 1
    Sounds like a bug... I guess that's another one we need to report...
    – sfdcfox
    Jan 11 '17 at 1:42
  • 3
    the known issues list with spring 17 is growing.. Jan 11 '17 at 1:55
  • For all the fuss made about unit tests in Apex and the 'hammer', you'd think it'd be part of Lightning by now...
    – Matt Lacey
    Jan 16 '17 at 23:39

As Doug Chasman answered on this question there is an issue with static resources in Spring'17. The issue is being tracked in R&D by W-3615844

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.