[jQuery] Re: dev tip: combining JS script files

2007-07-21 Thread Jon Ege Ronnenberg
When you load the script, has nothing to do with the dom. The script can modify/alter the dom but the loading sequence is a completely new story. If you use the jQuery ready() method, your script will be processed right after the dom is loaded and before the images are loaded, which is what you

[jQuery] Re: dev tip: combining JS script files

2007-07-21 Thread Gilles (Webunity)
Well i have to think about that, but i might do some releasing of code. The advantage i have, is that it runs on my own servers, so i get to choose the owner ;) On 21 jul, 09:14, Jon Ege Ronnenberg [EMAIL PROTECTED] wrote: When you load the script, has nothing to do with the dom. The script can

[jQuery] Re: dev tip: combining JS script files

2007-07-17 Thread Michael Geary
My understanding is we put script tags in the head so as to not clutter up the body DOM. I don't think it has anything to do with ready(), and I'm pretty sure ready() doesn't require script tags to be in the head... Yes, but if you put the scripts at the end of the body you

[jQuery] Re: dev tip: combining JS script files

2007-07-16 Thread Gilles (Webunity)
I've build something similar to this; here's how i did it: on my webserver, there are a bunch of JS and CSS files. During each page load, i create an array of CSS and JS files, which have to be included on that page. Currently i store these in session, but that isn't needed. In the header of the

[jQuery] Re: dev tip: combining JS script files

2007-07-16 Thread Klaus Hartl
Gilles (Webunity) wrote: I've build something similar to this; here's how i did it: on my webserver, there are a bunch of JS and CSS files. During each page load, i create an array of CSS and JS files, which have to be included on that page. Currently i store these in session, but that isn't

[jQuery] Re: dev tip: combining JS script files

2007-07-16 Thread Marcus Renz
There is a script at google-code for this: http://code.google.com/p/jscsscomp/ Cheers Muckinger Klaus Hartl schrieb am Montag, 16. Juli 2007, 11:23:57: KH Gilles (Webunity) wrote: I've build something similar to this; here's how i did it: on my webserver, there are a bunch of JS and CSS

[jQuery] Re: dev tip: combining JS script files

2007-07-16 Thread Stephan Beal
On Jul 16, 11:23 am, Klaus Hartl [EMAIL PROTECTED] wrote: You're saying that is done on each page load. Isn't it better to do that once, when deploying the files? How long does it take to merge the files? In a sense he IS only doing it once - he wrote the PHP code ONCE. ;) Now PHP gets to do

[jQuery] Re: dev tip: combining JS script files

2007-07-16 Thread Will Kelly
This might be of interest. A php implementation for caching and combining js/css files http://www.ejeliot.com/blog/73

[jQuery] Re: dev tip: combining JS script files

2007-07-16 Thread Terry B
This is a good page on optimzing javascript for speed... http://betterexplained.com/articles/speed-up-your-javascript-load-time/

[jQuery] Re: dev tip: combining JS script files

2007-07-16 Thread Fil
This is a good page on optimzing javascript for speed... http://betterexplained.com/articles/speed-up-your-javascript-load-time/ This part of the text seems contradictory with jQuery's habits. Why do we load jQuery.js and all its plugins in the head section? (answer: to have .ready()). But

[jQuery] Re: dev tip: combining JS script files

2007-07-16 Thread Geoffrey Knutzen
To: jquery-en@googlegroups.com Subject: [jQuery] Re: dev tip: combining JS script files This is a good page on optimzing javascript for speed... http://betterexplained.com/articles/speed-up-your-javascript-load-time/ This part of the text seems contradictory with jQuery's habits. Why do we load

[jQuery] Re: dev tip: combining JS script files

2007-07-16 Thread PaulHan
A way to do this is to call the php file directly in the script tag or css link tag i.e. link rel=stylesheet href=styles.php / script language=javascript src=scripts.php/script The nice thing about this is you can then specify which plugins or extra css to include in the querystring like this

[jQuery] Re: dev tip: combining JS script files

2007-07-16 Thread Erik Beeson
This part of the text seems contradictory with jQuery's habits. Why do we load jQuery.js and all its plugins in the head section? (answer: to have .ready()). But should we do it all the time and for all plugins? My understanding is we put script tags in the head so as to not clutter up the

[jQuery] Re: dev tip: combining JS script files

2007-07-16 Thread Klaus Hartl
Erik Beeson wrote: This part of the text seems contradictory with jQuery's habits. Why do we load jQuery.js and all its plugins in the head section? (answer: to have .ready()). But should we do it all the time and for all plugins? My understanding is we put script tags in the head so as to

[jQuery] Re: dev tip: combining JS script files

2007-07-16 Thread Erik Beeson
My understanding is we put script tags in the head so as to not clutter up the body DOM. I don't think it has anything to do with ready(), and I'm pretty sure ready() doesn't require script tags to be in the head... Yes, but if you put the scripts at the end of the body you don't need to

[jQuery] Re: dev tip: combining JS script files

2007-07-15 Thread Klaus Hartl
Stephan Beal wrote: Hi, all! i just wanted to take a moment to share a tip which i don't see used too often on live sites: Combine all of your JS scripts into a single file. This helps reduce the load time of the page by reducing the number of separate GET requests. In principal you should