function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
KellymtKellymt 

How to reference static resources NOT part of a managed package from pages part of a managed package

We have an managed package which references settings stored in static resource which is not part of the managed package. We want to keep the static resource not a part of the managed package because we want to let the user modify those settings. 
Could you please let me know what is the best practices way to referene static resources not part of a managed package wtihin Visualforce page which is part of a managed package. 
We cannot use URLFOR because that would require the resource to be a part of the package. 
If we handcraft the url like this <apex:includeScript value="/resource/1463666571000/foo" />
The resource would not be loaded because the absolute url will be https://MANAGEDPACKAGEPREFIX.cs80.visual.force.com/resource/1463666571000/foo and Salesforce will not find it because the resource sits here: 
https://c.cs80.visual.force.com/resource/1463666571000/foo

Thanks!
Kiran  KurellaKiran Kurella
What are you storing in the Static resource? Is it an image or JS file or settings data for the App?
KellymtKellymt
It is settings data for the app.
Kiran  KurellaKiran Kurella
Have you considered creating a Custom Settings object? Custom Settings object allows the end user to customize the data with respect to their environment. Optionally, you can create a Visual force page to add/change the custom settings data.

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_custom_settings.htm
David Kingery 6David Kingery 6
For setting's data I can see Custom Settings being useful, but what about other things? Images or JS files as you mentioned, CSS, or anything else?
I'd like to have a Visuaforce page (inside a managed package) reference both Static Resources in and out of said managed package.