5

Seems the new SFDC update ( Spring 17 ), it is now impossible to update a static resource.

We have a static resource named "res", containing a zip file with following content :

/resource ( folder )

  • /style/myCss.css

  • /img/myImage.jpg

etc ....

When we update myCss.css , regenerate the zip file, upload it by editing the static resource, in our lightning community app we still have the previous content of myCss.css ( checked with Chrome inspector )

We tried lots of things :

  • browser cache delete, change browser, change computer ....

  • even DELETE myCss.css and reuplaod the static resource,clear cache, and lightning app still contains myCss.css !!!

but the result is always the same.

Once a static resource is loaded the first time in a lightning app inside a community, its initial version is cached and can NOT be updated.

  • For what it's worth, I have the exact same problem and have not found an answer yet. I had to recreate the SR with a new name to get SFDC to detect the changes. – Sebastian Kessel Feb 23 '17 at 16:25
  • problem is that i can not delete the static resource because of its dependencies, and i can't remove all dependencies then recode them everytime I have a css class to update :( – Nicolas Vuillamy Feb 23 '17 at 16:27
  • I don't disagree. It's a big bug.... but I have not found an alternative yet. – Sebastian Kessel Feb 23 '17 at 16:27
  • Is this issue only in Communities? I've updated static resources plenty of times and never noticed a problem, but I'm not using Communities (mine is a standalone app, doesn't use Lightning Experience or Salesforce1 either). – Florissant53 Feb 23 '17 at 19:20
  • Can you please post the full URL(s) you're having an issue with so we can take a look? Thanks, -- Frank – Frank Leahy Feb 24 '17 at 0:04
1

How are you referencing the static resource? I'm betting by direct URL to something in /resource/.

Use $Resource, which adds cache busting tokens to the URL.

  • $Resource doesn't work in communities since Spring 17 – Nicolas Vuillamy Feb 24 '17 at 18:59

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.