I have an external js file which is being called and referenced in a page.
Now if i reference the same file 2 or 3times in the page will it download the same file 2 -3times when user is browsing through the site.
Or when it has downloaded once and see's a reference to same file at same location it won't download the file second time?
I hope you have understood my query.
It's only "downloaded" once, no matter how many times it is used in the coding.
No not like this...i will explain
I am a .Net developer so in my site i have something like master page and child page. So when a page is rendered on screen its a combination of both master and child page.
Now i can keep this reference of .js file like
in master as well as child page.
so now when the actual page is rendered onto the screen then it contains 2 references to same file i.e. file.js
So now in this case will it be downloaded 2 times or only 1 time.
Normally, a "Master page" is the template, with the stylistic HTML and cross-site coding, applicable to any child page; that child "page" really being just some .NET coding that creates unique main content or an event. Used correctly, the Master would have the <head> section of the template, meaning your js., and then negating the need of linking in your child page.
what do you mean by a "child page"? A page opened with a window.open() method?
It will not download the page again, as in actually contact the server to get it, it will be referenced in the cache, so the copy that has already been downloaded. But from the point of view of variables, it might as well be downloaded again, it is a new copy of the same file.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)