Adam,<div><br></div><div>When the module is disabled / enabled - it should take care of registering the resources.</div><div><br></div><div>Did you take look at of <a href="https://developers.google.com/speed/pagespeed/mod">mod_pagespeed</a> - let us know your observation?</div>

<div><br></div><div>Regards,</div><div>Prasad<br><br><div class="gmail_quote">On Tue, Feb 5, 2013 at 3:36 AM, Adam Heinz <span dir="ltr">&lt;<a href="mailto:amh@metricwise.net" target="_blank">amh@metricwise.net</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I&#39;m looking at how ModTracker exposes ModTrackerCommon.js and it appears that even though the widget is selectively enabled for other modules, the common javascript is always loaded?  If every module pushed their javascript into all other modules this way, we would be looking at O(n^2) javascript files loaded per page.<div>


<br></div><div>I decided to do some comparison against large web sites (google, amazon, etc) and over half a dozen sites, I am only seeing 3-4 javascript files per page.  I have the vtiger 5.4.0 Products module open on our site right now and it lists 38 javascript files!  So maybe this is something that we can try to get down to a more reasonable number so that the page load is faster?  I anticipate that vtiger 6.0.0 will kill off the half-dozen or so scriptaculous files, but there is a lot of third-party javascript broken out into separate files.</div>


</div>
<br>_______________________________________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br></blockquote></div><br></div>