Are you going to always be loading these .js files into your page?

If so, the most efficient option by far is to concatenate all of them into a
single .js file that you load with a single <script> tag.

Maybe explain more about why you want a bootstrap file, and what exactly you
want it to do?

-Mike

> From: Panman
> 
> Are browsers able to cache calls from jQuery.getScript 
> (http:// docs.jquery.com/Ajax/jQuery.getScript)? I'm just 
> trying to determine either to use that or just use HTML 
> <script> tags to get jQuery plugin files and such. Would like 
> the most officiant option. The reason being, I'd like to 
> break out the first option into a separate JavaScript file, 
> like a bootstrap file.
> 
> Option 1:
> <script type="text/javascript" src="/_assets/js/jquery.js"></script>
> <script type="text/javascript">
> $.getScript("/_assets/js/jquery.ui.all.js");
> $.getScript("/_assets/js/jquery.hoverIntent.js");
> </script>
> 
> </script>
> 
> Option 2:
> <script type="text/javascript" src="/_assets/js/jquery.js"></script>
> <script type="text/javascript" src="/_assets/js/jquery.ui.all.js"></
> script>
> <script type="text/javascript" src="/_assets/js/ 
> jquery.hoverIntent.js"></script>
> 

Reply via email to