You are here: Foswiki>Tasks Web>Item11980 (05 Jul 2015, GeorgeClark)Edit Attach

Item11980: add topic: param to jqLoader

Priority: Enhancement
Current State: Closed
Released In: 2.0.0
Target Release: major
Applies To: Engine
Component: JQueryPlugin
Branches: master
Reported By: SvenDowideit
Waiting For:
Last Change By: GeorgeClark
actually, another idea would be to add a type=jqloader to INCLUDE to simply convert server side include into client side..

combine this with an (oob) cache timeout policy for webs and topics, we can improve lots of things.

-- SvenDowideit - 02 Jul 2012

There's how to do that using the url param:

<verbatim class="jqLoader {url:'/ThisWeb/ThisTopic?section=stuff;skin=text;cache_expire=6 hours'}">

This will load stuff async'ly and cache it for 6 hours (given that $Foswiki::cfg{Cache}{Enabled} = 1;)

-- MichaelDaum - 02 Jul 2012

Michael - am I right in presuming that you're talking of server side cache, whereas i'm talking about client side cache?

tbh, I'd like to get away from using embedded URLs in wiki parameters - this is one of those places.

-- SvenDowideit - 03 Jul 2012

Client side caching doesn't come without its risks. That's because the client is rather decoupled from what happens on the server, of course. When you cache on the client side too aggressively, will you suffer from caching artifacts where users repeatedly see information long outdated by updates on the server.This is especially critical on wikis where you have much more interaction of users and pages than on a static website. There really isn't much you can do about this trade-off.

That aside, the jqLoader construction above is a nice solution to delay things that are normally integrated into a page using %INCLUDEs: instead of the server to construct all of the page in one chunk, the client fetches the raw skeleton and then patches in the more expensive parts later on. This is the main use case for the jqLoader. It reduces load time of the skeleton page while caching patches individually, a very common situation on dashboards for instance.

But in how far does adding a topic parameter to jqLoader leverage client side caching?

-- MichaelDaum - 03 Jul 2012
Topic revision: r7 - 05 Jul 2015, GeorgeClark - This page was cached on 17 Sep 2021 - 23:26.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy