So, what I propose is what you called "the ultimate solution" and my Another one based on client-side detection, with for example Else, we download the generic file, I mean jquery.js Of our precomputed files, we download the precomputed one, and not One based on user agent : if it is a user agent corresponding to one Now, when the page is loading, we can have two policices : This file is downloaded only if there is no browser-specific jquery It is aīit slower as there are more conditions. Generic browser as the feature detection is made dynamically. We still have a jQuery file like we have currently. Clear ? Not full jQ, just code required for IE version. Where IE specific version will contain only overwrites of *only*Ĭertain “stuff” just if necessary. Several jQ versions for several IE versions o) Not so much for "sniffing" out each and everyīrowser, but for having one version for all non IE browsers and Iteration tests which could be done once.Īnother way would be to download the entire script, but to do like The main reason I was asking for that was not because I wanted toĭownload a lighter file, but because I didn't wanted at each Unless you create as much files as there are features supportĬombinaisons, or you create it once on-the-fly when you have aĬombinaison that has never been encountered. > specific to a browser completely kills the benefit of loading less > and loading a piece of script for every feature implementation > The only way to know what the browser can do is to test its features, It is a bad idea because there is no such thing as foolproof browser
0 Comments
Leave a Reply. |