sansknwoledge
sansknwoledge

Reputation: 4259

adding jquery and jquery ui reference to master page script manager

one juvenile question , i am having a asp.net intranet application which is using jquery, instead of ref jquery to every page, i decided it to put it on the master page inside the script manager scriptReference tag. note not all pages of my application requires jquery, so is it a wise thing to do, or it will affect the performance, any ideas

Upvotes: 0

Views: 949

Answers (2)

Ender
Ender

Reputation: 15221

As long as the URL of the library remains consistent, your users' browsers should cache it the first time it is loaded. Any performance hits from having it included would then be minimal at best.

If possible, a further improvement might be to simply reference one of the many CDNs which host jQuery. This would essentially guarantee that your users would have a cached copy from one website or another.

Upvotes: 1

Andrew Cooper
Andrew Cooper

Reputation: 32586

It's not a bad idea. It won't affect performance greatly because the JQuery code should be cached by the client. It means you know it's always there and you don't have to think about it when you're adding new pages.

Upvotes: 1

Related Questions