7

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.

5
  • 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. Commented Feb 23, 2017 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 :( Commented Feb 23, 2017 at 16:27
  • I don't disagree. It's a big bug.... but I have not found an alternative yet. Commented Feb 23, 2017 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). Commented Feb 23, 2017 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 Commented Feb 24, 2017 at 0:04

2 Answers 2

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.

1
  • $Resource doesn't work in communities since Spring 17 Commented Feb 24, 2017 at 18:59
0

I am also face this issue. Please check static resource size should not be grater 10 MB. If you update size more than 10mb static resource is saved but zip file is not updated.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .