Question

I usually store my JavaScript/jQuery files in the Site Assets library, but I see on forums that others are using the Style Library.

What are the respective benefits of each?

Was it helpful?

Solution

Resources in Style Library will most likely send the correct caching headers.

There were issues in 2007, here is a good rundown.

http://www.sharepointnutsandbolts.com/2009/05/optimization-blob-caching-and-http-304s.html

OTHER TIPS

Another option is to deploy this to your _LAYOUTS folder.

As djeeg point out, Style Library has issues (304's due to incorrect max-age). I am not sure this is fixed (it would surprise me!).

Another plus for storing in a virtual directory is that you can use them across web applications, since they reside in the SharePoint root folder. This ofcourse can also be a weakness if you need permissions or versioning, so as usually when we are talking SharePoint, the answer is "it depends" :-)

Style Library is the default for pub portal template sites (i.e. internet facing sites).

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top