Cached libraries

Discussion in 'Javascript' started by Archos, Feb 11, 2012.

  1. Archos

    Archos Guest

    Does the JavaScripts files dowloaded by the browsers are cached by
    them?

    Web1 uses library Lib1.1.0.js
    Web2 use the same library

    If the user goes to Web1 then he gots that library. Now, the user
    closes the browser, open it again and he goes to Web2. Does
    Lib1.1.0.js is already in her system?

    My doubt is because I want to know if it's really useful to remove
    functions of a library that they are not going to used by your
    program. But if that library is cached, then it isn't better don't
    touch it.
     
    Archos, Feb 11, 2012
    #1
    1. Advertising

  2. Archos

    Archos Guest

    On Feb 11, 11:18 am, Archos <> wrote:
    > Does the JavaScripts files dowloaded by the browsers are cached by
    > them?
    >
    > Web1 uses library Lib1.1.0.js
    > Web2 use the same library
    >
    > If the user goes to Web1 then he gots that library. Now, the user
    > closes the browser, open it again and he goes to Web2. Does
    > Lib1.1.0.js is already in her system?
    >
    > My doubt is because I want to know if it's really useful to remove
    > functions of a library that they are not going to used by your
    > program. But if that library is cached, then it isn't better don't
    > touch it.

    Any comment about it? Thanks in advance!
     
    Archos, Feb 13, 2012
    #2
    1. Advertising

  3. On Feb 11, 5:18 am, Archos <> wrote:
    > Does the JavaScripts files dowloaded by the browsers are cached by
    > them?
    >
    > Web1 uses library Lib1.1.0.js
    > Web2 use the same library
    >
    > If the user goes to Web1 then he gots that library. Now, the user
    > closes the browser, open it again and he goes to Web2. Does
    > Lib1.1.0.js is already in her system?
    >
    > My doubt is because I want to know if it's really useful to remove
    > functions of a library that they are not going to used by your
    > program. But if that library is cached, then it isn't better don't
    > touch it.


    Browsers will possibly cache the library on both websites if they
    share the same location:

    Website 1 and website 2 contains:
    <script src="http://example.com/myLib.js">

    This will probably not work:

    Website 1 contains:
    <script src="myLib.js">

    Website 2 contains:
    <script src="myLib.js">

    There was a discussion IIRC involving resource hashing a few years ago
    but I don't think anything came from it. Perhaps someone can recall in
    more detail (and offer a link), but I believe there was a short
    argument between Crockford and Eich on a similar topic.
     
    Michael Haufe (TNO), Feb 13, 2012
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. A.S.V. Rosales

    Cached Dataview insert into MS-SQL2000

    A.S.V. Rosales, Jun 26, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    1,087
    A.S.V. Rosales
    Jun 26, 2003
  2. Steve

    Cached User Controls

    Steve, Jul 7, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    373
    Karl Seguin
    Jul 7, 2003
  3. Craig G
    Replies:
    0
    Views:
    393
    Craig G
    Mar 7, 2005
  4. Karsten Wutzke
    Replies:
    21
    Views:
    920
    Roedy Green
    Jun 29, 2007
  5. Sriram Srinivasan
    Replies:
    13
    Views:
    569
    Benjamin Kaplan
    Nov 12, 2009
Loading...

Share This Page