3.2.0

How to avoid loading aw.js at each page

is it possible to load aw.js and aw.css in an hidden frame and use then in all the other pages:which will avoid loading these files each time we need.
thierry
February 6,
All browsers have strategy for cache, u dont need worry about this.

Infact, u need write the sript url in each page, iframe its not a good idea anymore :-)
Pc (from Brazil)
February 6,
Pc is right, usually browsers have caching enabled.

Just keep in mind that the Web server must also be properly configured in a way that it doesn't sends headers for invalidating cache (and so, making caching mechanisms useless on purpose). With this I mean HTTP headers like:

Pragma: no-cache
Cache-Control: no-cache
Expires: Fri, 30 Oct 1998 14:19:41 GMT


Regards,
Helder Magalhães
February 8,
ok but you don't answer my question.
I found the solution and now performance is much better
Thierry
February 10,
Would like to know your solution Thierry.

To pc from brazil, even if javascript is cached, does that mean the parse tree of the javascript is cached? Does that mean the construction of the classes is cached?
D
February 10,
1/ dividing en frames like this (that is an exemple)
<frameset rows="96,*" frameborder="NO" border="0" framespacing="0" cols="*">

<frame name="xheader" scrolling="NO" noresize src="xheader.php" >

<frameset cols="163,*" frameborder="NO" border="0" framespacing="0" rows="*">

<frame name="xtoc" noresize src="xtoc.htm">

<frameset rows="*,1" frameborder="NO" border="0" framespacing="0" cols="*">

<frameset cols="15,*" frameborder="NO" border="0" framespacing="0">

<frame name="xtoc2" scrolling="NO" noresize src="xtoc2.htm">

      <frame name="xcontent" src="index.php?x=x">

     </frameset>;

     <frame name="xcontrole" scrolling="yes" noresize src="xcontrole.htm">

    </frameset>

  </frameset>

</frameset>



2/ Include in xheader frame the AW code in one <div>

<div id="toto">
<script>
here aw.js coding
</script>
</div>


3/ In each page

replace <script src="runtime/lib/aw.js"></script>

by this
<script>
document.write(parent.xheader.document.getElementById("toto").innerHTML);
</script>

I think that .js library is downloaded only one time.




Thierry
February 11,
If the cache is enabled, the browser will not download the js again, only if the lastModified has changed.
Pc (from Brazil)
February 11,
how about change the src attribute with runtime/lib/aw.js?timestamp=1171044604

will it be uncached?
franzetic
February 12,
yes, the client will always retrieve the new file. (if the timestamp value change every time).
Pc (from Brazil)
February 12,

This topic is archived.

See also:


Back to support forum