views:

103

answers:

2

The lazy loading functionality is very cool in SlickGrid - but has anyone had any experience of the background loading of future pages?

This would therefore mean that there is no buffering/loading of data when a user gets to a point of the grid where there is no data yet loaded - therefore speeding up the user experience.

A: 

There are a couple of options to offer this kind of functionality.

Prefetching. Mozilla: Link Prefetching FAQ

Adding the following to the head of page1.htm would allow background prefetching of page2.htm in browsers supporting this functionality.

<link rel="next" href="page2.htm" >

As I said, I am not sure of the browsers which do, and do not, support this functionality, but, if you were wanting to provide the same functionality for all browsers, you could also code, in jQuery, a function which runs for any browsers which do not support the Prefetch, to create a hidden iFrame.

IFrames StackOverflow: iframe preloading

Creating an iframe, like the following, either through basic HTML coding, or dynamically using jQuery, would load page2.htm whilst still displaying page1.htm (and should provide a performance boost so long as the referenced page is cache-friendly).

<iframe src="page2.htm" width="1" height="1" frameborder="0" scrolling="no" style="position:absolute;top:-3000px;left:-3000px;></iframe>
Lucanos
A: 

We found a workaround for this by using setTimeout, so every time we go to get 50 records, we are setting a timeout to get another 50 in a few seconds.

Robert W