I have many visualforce pages which are pulling in the same static resource js files.

How do I include one static resource within another static resource so I only have to pull one file into the visualforce page?

1 Answer 1


You can create a visualforce component and put all the repetiting static resources in it.

Then put this component at the end of any page (considering all static resources are JS) you want to refer.

This will work because visualforce component DOM is fetched and included in the containing page.

You must log in to answer this question.

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