2

I am building out a Single Page Application using knockout.js on a sub-site which I do have control of the parent site collection. I know most people recommend storing JS and CSS files in the Style Library but logically I find it odd if I were to store JS, CSS and HTML which are specific to a single page on a sub-site in the site collection Style Library.

So right now I have CSS, JS, IMAGE and HTML folders in the Site Assets library of the sub-site.

Thoughts?

1 Answer 1

2

There are "best practice" of doing it, but it really comes down to scope. If the files work where you have them and they can be correctly deployed there, I would say let them stay there.

It is really all about getting files into the right scope onto the server.

Now if this application is shared on multiple sub-sites, definitely move the files to a shared location.

3
  • Thanks. I am going a 'split' route basically. All of the libraries I am using (knockout, jQuery etc.) are getting dropped into the Style Library. But the code which is SPECIFIC to that page and that page only (since it is MVVM) I am keeping in the local library. I think it will actually help me manage in the long run. Commented Mar 22, 2013 at 14:46
  • That would be the right way to go. In the answer I referring more to the css and js files. Commented Mar 22, 2013 at 14:53
  • 1
    This should be marked as the answer if it solved your issue Commented Mar 23, 2013 at 4:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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