English 中文(简体)
SlickGrid - Background Loading of Pages
原标题:

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.

最佳回答

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.

问题回答

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>




相关问题
getGridParam is not a function

The HTML: <a href="javascript:void(0)" id="m1">Get Selected id s</a> The Function: jQuery("#m1").click( function() { var s; s = jQuery("#list4").getGridParam( selarrrow )...

selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

jQuery cycle page with links

I am using the cycle plugin with pager functionality like this : $j( #homebox ) .cycle({ fx: fade , speed: fast , timeout: 9000, pager: #home-thumbs , ...

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

jConfirm with this existing code

I need help to use jConfirm with this existing code (php & Jquery & jAlert). function logout() { if (confirm("Do you really want to logout?")) window.location.href = "logout.php"; } ...

Wrap text after particular symbol with jQuery

What I m trying to do, is wrap text into div inside ll tag. It wouldn t be a problem, but I need to wrap text that appears particularly after "-" (minus) including "minus" itself. This is my html: &...

热门标签