Answer the question
In order to leave comments, you need to log in
Cross browser dependency library (js, css)?
Hello.
For a long time I used a slightly modified jQuery $.include plugin to manage dependencies and load the necessary scripts / styles from the initialization file until I realized that it behaves very strangely in IE (and in version 9 too) - the callback is sometimes called three times , files may be underloaded, strange subtle errors. Accordingly, a bunch of hacks have been made, in which everything seems to work, but is somehow unstable and on crutches.
Is there an analogue of this extension that definitely works fine in all modern (and slightly ancient) browsers? I'm not picky at all - a callback to the end of the script or link loading and the order of imports.
Answer the question
In order to leave comments, you need to log in
Haven't tried it myself but read about using requirejs . I myself use backbone js for the client side, I think to try requirejs backbonetutorials.com/organizing-backbone-using-modules/
There is also this approach habrahabr.ru/company/mailru/blog/136899/ (Mail and Yandex, etc...) :
"Let the resulting HTML, which is the result of working out all our logic, be the config of what needs to be included."
In this post there is a link to a comparison and a voluminous list of such utilities.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question