View Full Version : Caching and optimization
sfarrow
10-22-2003, 10:58 AM
Our client has commented on the load times for our lzx files especially on less than "state of the art" computers and over dialup connections.
What client-side caching is provided. I have occasionally seen on the server console a "NOT MODIFIED" message when a request is made for an lzx file. I assume that this means that the browser is instructed to use the swf in its cache to save from downloading the same swf again. I have yet to understand the conditions under which this occurs. Perhaps you can enlighten me.
Thanks.
Steve
antun
10-22-2003, 11:10 AM
Your browser cache is the client-side cacheing in Laszlo apps. The LPS does do its best to make the most of this.
Most browsers will cache properly with no problems, however I believe the one browser that problems have been noted with is Safari. The if-modified-since headers type of cacheing is completely broken in Safari (not just as far as SWF files are concerned, but all files). We have filed this bug with Apple, but as yet there has been no resolution.
What browsers are you having difficulty with load times on?
When calling setSource(), you can specify where and how the media is to be cached. This is useful for things like streaming video and audio, where you may not want to use server or client cacheing or neither.
Does that help?
-Antun
bloch
10-22-2003, 11:16 AM
Antun,
The LPS does If-Modified-Since/Last-Modified
processing for app downloads. As you described,
this works reliably for all browsers
we've tested, except Safari. The second
time a user surfs to an unchanged app, using
precisely the same url (.lzx?lzt=swf including any additional query string), the server will
respond with a NOT_MODIFIED (304).
-Eric
sfarrow
10-23-2003, 12:13 PM
Our webapp has in place filters to provide security and to decorate returned pages with an HTML header and footer to navigate the application.
These filters were affecting the browser caching of the swfs. I have adapted the application to avoid the filters for lzx requests by introducing a servlet to return the HTML wrapper for the swf instead of relying on the lps to return the wrapper.
Caching is now working as expected.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.