@DBj

Not exactly.

Before use, we generate a few browser-specific jquery files, like
jquery.ie7.js, jquery.ie6.js. Theses files are generated server-side
from the current jquery.js file from a support detection database. For
example, for IE6, we already know that the box model isn't supported.
So we replace all occurrences of if( jQuery.support.boxModel )
{ instruction a } else { instruction b } by instruction b.

We still have a jQuery file like we have currently. It can work on a
generic browser as the feature detection is made dynamically. It is a
bit slower as there are more conditions. The file name is jquery.js.
This file is downloaded only if there is no browser-specific jquery
file.

Now, when the page is loading, we can have two policices :
- One based on user agent : if it is a user agent corresponding to one
of our precomputed files, we download the precomputed one, and not
jquery.js. Else, we download the generic file, I mean jquery.js

- Another one based on client-side detection, with for example
<!--[if lt IE 7]>
<!-- Internet Explorer before IE7 -->
<script src="jquery.2.ie_before_7.js" ></script>
<![endif]-->

So, what I propose is what you called "the ultimate solution" and my
precedent message explained how I would generate the different files.

Regards,
Ludovic
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to