php - JQuery datatables and slowing data display -


i'm using jquery datatable display projects existing in database:

<script type="text/javascript" charset="utf-8">     $(document).ready(function(){         $('table.display').datatable({             "bjqueryui": true,              "spaginationtype": "two_button",              "aasorting":[[2, "desc"]],              "bretrieve": true,               "idisplaylength": 10, // 10 records displayed default               "sscrolly": "250px",               "sdom": '<"h"tfr>t<"f"ip>',               "otabletools": {                   "srowselect": "multi",                   "abuttons": [                       "copy",                        {                           "sextends": "csv",                           "stitle": "data"                       }                                        ]                }         });     }) </script> 

if there more 10 records, possible move next 10 records using button.

the problem 1 of colleagues told me make page slow in case have huge number of projects. i'm not sure because if choose display 10 records, won't make page slow. right ?

bests

if there more 10 records, possible move next 10 records using button? yes, absolutly.

datatables work in 2 ways:

  1. client side, means data downloaded , paged ( automatically datatable, ex: 10 records per page ). way,page slow if have huge amount of data
  2. server side, way datatable downloaded requested data, request server each time next / previous page. way must have server side code paging data manually ( of course must compatible request datatable ).

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -