Loading ...
Sorry, an error occurred while loading the content.

Does Ajile use the browsers cache for js files?

Expand Messages
  • kainhart
    I m considering using Ajile for a company project but I m concerned about whether using Ajiles Import and Loading mechansims bypass any of the browsers built
    Message 1 of 4 , Sep 21, 2006
    • 0 Attachment
      I'm considering using Ajile for a company project but I'm concerned
      about whether using Ajiles Import and Loading mechansims bypass any of
      the browsers built in caching mechansisms so that these js files that
      are imported or loaded are not downloaded from the server every time.
      I looked a little through the documentation but it is still unclear to
      me how this works or if it is possible to tie into the browsers cached
      copies of each js file.

      By the way our solution is mainly for IE6 and mostlikely IE7 soon.
    • iskitzdev
      Hi, Current releases of Ajile don t intentionally manage browser caching. The following is an explanation of the Load and Import behavior as they relate to
      Message 2 of 4 , Sep 22, 2006
      • 0 Attachment
        Hi,
        Current releases of Ajile don't intentionally manage browser caching.
        The following is an explanation of the Load and Import behavior as they
        relate to browser caching:


        1. Load instructs the browser to load the specified script file from
        the specified location.

        2. Import uses Load to load the corresponding script file for the
        specified
        module or namespace.

        3. Import only uses Load if the specified module or namespace isn't
        already
        in memory. For example:

        Import("com.iskitz.ajile.examples.ImportExample");

        This statement will only instruct the browser to load the script file
        if the
        ImportExample object or property is undefined or equal to null.


        In addition to the aforementioned behavior, your browser will use it's
        own cache settings to determine whether to reload a script from it's
        source. If the script resides on a web server, the web server may set
        headers that instruct your browser to sevre the script from its cache
        rather than reloading it from the web server.

        Forcing a script to be reloaded from the server:

        Ajile's Load directive can be used to guarantee unique server requests
        for a script file by using the standard HTTP request technique of
        appending a unique query parameter to the request. Using JavaScript this
        can be achieved by appending a randomly generated number to the script
        request. For example:

        Load("http://somewhere.com/script.js?refresh="+Math.random());

        The Import directive doesn't currently provide a mechanism to force
        reloading a script, but that functionality is planned and will be
        available in a future release, most-likely the next.


        Let me know if this answers your questions or if you need more
        information.


        Good luck,
        Michael


        --- In ajile@yahoogroups.com, "kainhart" <kainhart@...> wrote:
        >
        > I'm considering using Ajile for a company project but I'm concerned
        > about whether using Ajiles Import and Loading mechansims bypass any of
        > the browsers built in caching mechansisms so that these js files that
        > are imported or loaded are not downloaded from the server every time.
        > I looked a little through the documentation but it is still unclear to
        > me how this works or if it is possible to tie into the browsers cached
        > copies of each js file.
        >
        > By the way our solution is mainly for IE6 and mostlikely IE7 soon.
        >



        [Non-text portions of this message have been removed]
      • kainhart
        ... file ... Yes I think this explains enough. I guess I have to look more into web server headers to learn how the the popular browsers use caching in these
        Message 3 of 4 , Sep 26, 2006
        • 0 Attachment
          --- In ajile@yahoogroups.com, "iskitzdev" <iskitzdev@...> wrote:
          >
          > Hi,
          > Current releases of Ajile don't intentionally manage browser caching.
          > The following is an explanation of the Load and Import behavior as they
          > relate to browser caching:
          >
          >
          > 1. Load instructs the browser to load the specified script file from
          > the specified location.
          >
          > 2. Import uses Load to load the corresponding script file for the
          > specified
          > module or namespace.
          >
          > 3. Import only uses Load if the specified module or namespace isn't
          > already
          > in memory. For example:
          >
          > Import("com.iskitz.ajile.examples.ImportExample");
          >
          > This statement will only instruct the browser to load the script
          file
          > if the
          > ImportExample object or property is undefined or equal to null.
          >
          >
          > In addition to the aforementioned behavior, your browser will use it's
          > own cache settings to determine whether to reload a script from it's
          > source. If the script resides on a web server, the web server may set
          > headers that instruct your browser to sevre the script from its cache
          > rather than reloading it from the web server.
          >
          > Forcing a script to be reloaded from the server:
          >
          > Ajile's Load directive can be used to guarantee unique server requests
          > for a script file by using the standard HTTP request technique of
          > appending a unique query parameter to the request. Using JavaScript this
          > can be achieved by appending a randomly generated number to the script
          > request. For example:
          >
          > Load("http://somewhere.com/script.js?refresh="+Math.random());
          >
          > The Import directive doesn't currently provide a mechanism to force
          > reloading a script, but that functionality is planned and will be
          > available in a future release, most-likely the next.
          >
          >
          > Let me know if this answers your questions or if you need more
          > information.
          >
          >
          > Good luck,
          > Michael
          >
          >
          > --- In ajile@yahoogroups.com, "kainhart" <kainhart@> wrote:
          > >
          > > I'm considering using Ajile for a company project but I'm concerned
          > > about whether using Ajiles Import and Loading mechansims bypass any of
          > > the browsers built in caching mechansisms so that these js files that
          > > are imported or loaded are not downloaded from the server every time.
          > > I looked a little through the documentation but it is still unclear to
          > > me how this works or if it is possible to tie into the browsers cached
          > > copies of each js file.
          > >
          > > By the way our solution is mainly for IE6 and mostlikely IE7 soon.
          > >
          >
          >
          >
          > [Non-text portions of this message have been removed]
          >


          Yes I think this explains enough. I guess I have to look more into web
          server headers to learn how the the popular browsers use caching in
          these cases. From your explanation though it sounds like Ajile should
          be able to be used in such a way that it wouldn't require any more
          traffic when compared to including script source tags directly on the
          page.

          Thanks
        • iskitzdev
          ... caching. ... they ... it s ... set ... cache ... requests ... this ... script ... concerned ... any of ... that ... time. ... unclear to ... cached ...
          Message 4 of 4 , Sep 27, 2006
          • 0 Attachment
            --- In ajile@yahoogroups.com, "kainhart" <kainhart@...> wrote:
            >
            > --- In ajile@yahoogroups.com, "iskitzdev" iskitzdev@ wrote:
            > >
            > > Hi,
            > > Current releases of Ajile don't intentionally manage browser
            caching.
            > > The following is an explanation of the Load and Import behavior as
            they
            > > relate to browser caching:
            > >
            > >
            > > 1. Load instructs the browser to load the specified script file from
            > > the specified location.
            > >
            > > 2. Import uses Load to load the corresponding script file for the
            > > specified
            > > module or namespace.
            > >
            > > 3. Import only uses Load if the specified module or namespace isn't
            > > already
            > > in memory. For example:
            > >
            > > Import("com.iskitz.ajile.examples.ImportExample");
            > >
            > > This statement will only instruct the browser to load the script
            > file
            > > if the
            > > ImportExample object or property is undefined or equal to null.
            > >
            > >
            > > In addition to the aforementioned behavior, your browser will use
            it's
            > > own cache settings to determine whether to reload a script from it's
            > > source. If the script resides on a web server, the web server may
            set
            > > headers that instruct your browser to sevre the script from its
            cache
            > > rather than reloading it from the web server.
            > >
            > > Forcing a script to be reloaded from the server:
            > >
            > > Ajile's Load directive can be used to guarantee unique server
            requests
            > > for a script file by using the standard HTTP request technique of
            > > appending a unique query parameter to the request. Using JavaScript
            this
            > > can be achieved by appending a randomly generated number to the
            script
            > > request. For example:
            > >
            > > Load("http://somewhere.com/script.js?refresh="+Math.random());
            > >
            > > The Import directive doesn't currently provide a mechanism to force
            > > reloading a script, but that functionality is planned and will be
            > > available in a future release, most-likely the next.
            > >
            > >
            > > Let me know if this answers your questions or if you need more
            > > information.
            > >
            > >
            > > Good luck,
            > > Michael
            > >
            > >
            > > --- In ajile@yahoogroups.com, "kainhart" <kainhart@> wrote:
            > > >
            > > > I'm considering using Ajile for a company project but I'm
            concerned
            > > > about whether using Ajiles Import and Loading mechansims bypass
            any of
            > > > the browsers built in caching mechansisms so that these js files
            that
            > > > are imported or loaded are not downloaded from the server every
            time.
            > > > I looked a little through the documentation but it is still
            unclear to
            > > > me how this works or if it is possible to tie into the browsers
            cached
            > > > copies of each js file.
            > > >
            > > > By the way our solution is mainly for IE6 and mostlikely IE7 soon.
            > > >
            >
            >
            > Yes I think this explains enough. I guess I have to look more into web
            > server headers to learn how the the popular browsers use caching in
            > these cases. From your explanation though it sounds like Ajile should
            > be able to be used in such a way that it wouldn't require any more
            > traffic when compared to including script source tags directly on the
            > page.


            That's right, in general Ajile will make fewer requests when one or more
            scripts are used multiple times. This would be most noticeable if
            browser caching was turned off.

            >
            > Thanks
            >

            No problem. FYI, Ajile 0.7 is available for download
            <http://prdownloads.sourceforge.net/ajile/Ajile.0.7.zip?download> .


            -Michael



            [Non-text portions of this message have been removed]
          Your message has been successfully submitted and would be delivered to recipients shortly.