[gwt-contrib] Re: JavaScript Bundling
Watch out for certain JS libraries. There are libraries that call other sub-libraries or resources (images/ css) by (relative) url. These wont be easily bundled into a single script! Regards, Menno van Gangelen. On Mar 12, 4:19 pm, Allahbaksh Asadullah wrote: > Hi, > As I have too many JavaScript file and most of them are static and are in > Apache or BSD licence. So it doesnot make any difference if I combine all > the JavaScript into a single file. Is it a recommended way? Using GWT Linker > as Bruce and Thomas say is most appropriate way? What are the performance > aspects? Are there any plans to have exclusive javascript bundling? > Regards, > allahbaksh > > > > On Thu, Mar 12, 2009 at 8:28 PM, Bruce Johnson wrote: > > On Wed, Mar 11, 2009 at 9:32 PM, Thomas Broyer wrote: > > >> a) use a GWT Linker [1,2] to prepend scripts dependencies ( > >> in your modules' gwt.xml) to the selection script; the problem is that > >> the selection script isn't (shouldn't be) cached, so it should remain > >> as small as possible. > > > It's good to paranoid about the speed of the selection script download, but > > in practice this probably isn't so bad if you have properly configured HTTP > > headers. The exact semantics for the selection scripts are "must revalidate" > > rather than "cannot cache". In other words, an If-Modified-Since request for > > the selection script should be returning "Not Modified" except when the app > > is actually redeployed on the server. > > > Thus, I kinda like (a). --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: JavaScript Bundling
Hi, As I have too many JavaScript file and most of them are static and are in Apache or BSD licence. So it doesnot make any difference if I combine all the JavaScript into a single file. Is it a recommended way? Using GWT Linker as Bruce and Thomas say is most appropriate way? What are the performance aspects? Are there any plans to have exclusive javascript bundling? Regards, allahbaksh On Thu, Mar 12, 2009 at 8:28 PM, Bruce Johnson wrote: > On Wed, Mar 11, 2009 at 9:32 PM, Thomas Broyer wrote: > >> a) use a GWT Linker [1,2] to prepend scripts dependencies ( >> in your modules' gwt.xml) to the selection script; the problem is that >> the selection script isn't (shouldn't be) cached, so it should remain >> as small as possible. > > > It's good to paranoid about the speed of the selection script download, but > in practice this probably isn't so bad if you have properly configured HTTP > headers. The exact semantics for the selection scripts are "must revalidate" > rather than "cannot cache". In other words, an If-Modified-Since request for > the selection script should be returning "Not Modified" except when the app > is actually redeployed on the server. > > Thus, I kinda like (a). > > > > > > > --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: JavaScript Bundling
On Wed, Mar 11, 2009 at 9:32 PM, Thomas Broyer wrote: > a) use a GWT Linker [1,2] to prepend scripts dependencies ( > in your modules' gwt.xml) to the selection script; the problem is that > the selection script isn't (shouldn't be) cached, so it should remain > as small as possible. It's good to paranoid about the speed of the selection script download, but in practice this probably isn't so bad if you have properly configured HTTP headers. The exact semantics for the selection scripts are "must revalidate" rather than "cannot cache". In other words, an If-Modified-Since request for the selection script should be returning "Not Modified" except when the app is actually redeployed on the server. Thus, I kinda like (a). --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: JavaScript Bundling
On 12 mar, 01:51, Allahbaksh Asadullah wrote: > Hi, > In most of cases we face situation where there are existing JavaScript > library available to do specific job (Example Online Diff). We don't want to > write it again but number of HTTP request to get those JavaScript files are > some times huge. > Can we bundle javascript or load it as Text Resources and do something with > it? Is something of that sort could save lot of HTTPRequest? > > Can some one let me know whether the idea of doing this is good or it will > not workout properly. Two solutions come to mind: a) use a GWT Linker [1,2] to prepend scripts dependencies ( in your modules' gwt.xml) to the selection script; the problem is that the selection script isn't (shouldn't be) cached, so it should remain as small as possible. b) use YUI Builder [3] to concatenate (and minify) all your scripts into a single file; it should be done up-front as it impacts your
[gwt-contrib] Re: JavaScript Bundling
You can use a TextResource from the incubator and dynamically add a