Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

jquery - have 1 file for library and plugins ?

Options
  • 10-03-2009 12:47pm
    #1
    Registered Users Posts: 872 ✭✭✭


    Hi,

    Is it possible to have just 1 js file for the jquery library and about 5 separate plugins ? I mean copying the contents on the plugin files into the main jquery js file ?

    I imagine some conflicts could occur but maybe im wrong ?

    Thanks in advance,


Comments

  • Registered Users Posts: 6,511 ✭✭✭daymobrew


    I cannot see a problem.
    cat *.js >big.js
    


  • Closed Accounts Posts: 18,163 ✭✭✭✭Liam Byrne


    I can......when jquery or the plugins get updated.

    Having a js file for each means that you can update them independently - far better.


  • Registered Users Posts: 6,511 ✭✭✭daymobrew


    Liam Byrne wrote: »
    I can......when jquery or the plugins get updated.

    Having a js file for each means that you can update them independently - far better.
    Redoing the 'cat' is very easy. Yes it is a larger download for visitors but there are less files to download. Maybe try both out in YSlow.


  • Closed Accounts Posts: 18,163 ✭✭✭✭Liam Byrne


    daymobrew wrote: »
    Yes it is a larger download for visitors but there are less files to download. Maybe try both out in YSlow.

    Of course, with Google hosting the file repository now, there's always the option of linking to that, so that if visitors have accessed another site that uses that, the browser would have cached it and it'd be VERY fast!


Advertisement