Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Web
Expertise: Beginner
Oct 27, 1999



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Move Common Sources Between Web Pages Into a Separate File

You can increase the speed of download by reducing the number of bits each page needs to be displayed. One way to shrink the download size is to reuse components that are common to two or more of the pages. It is possible that multiple DHTML pages on the website site may be using the same script code, again and again. In such scenarios, the common routines intended to be used on every page can be moved into a common .js (JScript) file or .vb (VBScript) file. This file can then be included in the file with the SRC attribute on the script tag:
<script src="Commonfile.vb"> </script>
Because the common source has been moved into a separate file, the file only has to be downloaded only once. After the first download, the file remains in the browser cache, and thus never needs to come over the network again.
Jai Bardhan
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date