Lift Web Framework

Lift supports lazy loading of a snippet. This is useful when a snippet may take a long time to render, but you want to return the page to the browser quickly.

Loading
Loading
Loading
Loading

The Markup:

  <div>
    <lift:lazy-load><div class="lift:LongTime"></div></lift:lazy-load>
  </div>

The Scala Code:

object LongTime {
  def render = {
    val delay = 1000L + randomLong(10000)

    Thread.sleep(delay)
    
    <div>
    This thread delayed {delay / 1000L} seconds
    </div>
  }
}

Lift is Copyright 2007-2010 WorldWide Conferencing, LLC. Distributed under an Apache 2.0 License.
Lift version 2.3 built on Tue Apr 05 13:24:00 PDT 2011.
Stats: Total Memory: 494,403,584 Free Memory: 427,413,808 Open Sessions: 143
Updated At: Sat Feb 04 09:37:51 PST 2012 Started At: Thu Jul 07 11:17:57 PDT 2011