put All jquery Scripts in master page
i am using jquery and jquery ui plugins in my web application. and i have some asp.net server controls that they register their scripts on the开发者_开发百科 page. Since my application should be work Local could i put all scripts in master page ? all scripts i mean jquery script and jquery Ui scripts such as DatePicker Dialog and effects. or is there any better way exist? because i want to jquery in all my pages and user Controls. thanks.
Sticking them in the master is definitely the simplest approach if you intend to have them available on every page.
It sounds like you're including all the scripts individually though, you can include just one file for jQuery UI, for instance:
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.min.js"></script>
Yes, put them all in the Master Page.
Once they're downloaded, they'll be cached in the browser (if they already aren't)
精彩评论