This question already has an answer here:

What is the best place to store resource files like css, images & Javascript files.

At the moment i am storing them in layouts folder, but we can store the same in Style Library as well...

So is there any difference in terms of overall performance of the site?

marked as duplicate by Ganesh Sanap, Mohamed El-Qassas MVP Apr 20 at 16:49

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


No, There is no difference, recommended to store the scripts in Style library which may have a change in near future based on Application functionality. Other JS files which are static like Jquery refernce and all can be stored in layout folder as you are not going to modify it.

  • I personally don't even have access to those pages. I store them in an added library (reading permissions to everyone on it), which I know is kinda unprofessional, but as long as it works :) – SteffPoint Jun 16 '16 at 7:41
  • Its not unprofessional unless you are managing the library correctly i.e. not letting anyone else modify it. you can always add a description to the library as what it is used for. – Ankit Kumar Jun 16 '16 at 8:04

The best place to store files isn't depended actually on where it is. In my opinion it is only important, that "Everyone" has reading permission to the library where u store the files. For me it's on the TopLevel Site (because everyone has reading permission on it). For your scripts you can add a library, to which everyone has reading access. For pictures I can recommend you the standardly created "Site Assets".

Well but as you said, storing the script files in layouts folder or in the style library is the most professional way in my opinion.


Since you employee SharePoint and better user of SharePoint functionality, store them in SiteAssets library, try to avoid layouts folder, even u can keep caching bundling the files and if you engage MDS, SharePoint take care of many of things for the performance is considered

I recommend to place it in site assets library.

You can make use of default MDS, Caching, bundling, performance, access related and dynamically change at any point of time as per customer requirements with out any deployment or down time(very important for customer related point of view)


Storing resource files in Style Library is a remnant from MOSS times when you couldn't store them in _catalogs/masterpage.

I recommend storing them inside _catalogs/masterpage/yourfolder, so that you can have all custom resources (including also .master and page layouts) in same location for easy deployment and management.

  • I am deploying these files using Mapped folder in Visual studio, so deployment is not an issue. What I am more concerned about is the overall performance of the site. – Gaurav Vijh Jun 17 '16 at 0:44

Not the answer you're looking for? Browse other questions tagged or ask your own question.