Application code for deployment to a client over a data link is optimized
to minimize download time by supplying only the application code with a
particular object that is required by the object. In a web application
that includes multiple pages, the HTML and JAVASCRIPT are scanned to
identify code resources called by a particular web page. When all called
resources are identified, they are extracted and concatenated into a
single resource file. When the page is downloaded to the client, the
import file is included with the page. The import file may be cached so
that it need only be downloaded once, rather than being downloaded every
time the page is requested. The invention is suitable for use with other
interpreted scripting languages.