3

After saving a change to a file in a zipped static resource, all of the files in that static resource return 404 errors. If the changed files that caused the problem are added to another zipped static resource, all of its contents also become inaccessible. What causes this and how can it be fixed?

3

The most common reason for getting a 404 error trying to access a file inside a zipped static resource is that you're not using the right syntax, or don't have the filename exactly right (see here, here and here).

Nevertheless, we just experienced an issue where we had valid references to files inside a zipped static resource and they started returning 404 errors after one update to that static resource. We tried a variety of fixes and were able to determine that the individual components inside zip file static resources are cached and de-duplicated by Salesforce (no matter what they're named), so that Salesforce does not have to store 1,000 copies of jquery.js from 1,000 customers, for example. Salesforce encountered some problems with one or more of the files that were in our zipped static resource with the result that any zipped static resource that included those files would return 404 errors for all it's contents (even if the files were re-named and put individually into new static resources). The resolution for us was to make minor changes to the constituent files and then re-upload them, this way Salesforce recognized them as being changed files. Any zipped static resource that contains the original versions of those files is still broken, and we're reporting this to Salesforce support.

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.