Too many ajax request

Too many ajax request

fbolandfboland Posts: 18Questions: 0Answers: 0
edited December 2013 in DataTables 1.9
Hi,

I'm trying to run datatable in server side processing mode with scroller like in this example : http://datatables.net/release-datatables/extras/Scroller/server-side_processing.html

Here is my code :

[code]
$(document).ready(function()
{
$('.datatable1').dataTable(
{
"sScrollY": "500px",
"sAjaxSource": "TestDataTableAjax1.php",
"bServerSide": true,
"sDom": "frtiS",
"oScroller": { "loadingIndicator": true }
});
});
[/code]

The problem is that when i scroll slowly, i realize that several ajax request are done instead of one.
For one mouse wheel, all these request are done :

[code]
http://web.toto.com/TestDataTableAjax1.php?sEcho=2&iColumns=2&sColumns=&iDisplayStart=12&iDisplayLength=189&mDataProp_0=0&mDataProp_1=1&sSearch=&bRegex=false&sSearch_0=&bRegex_0=false&bSearchable_0=true&sSearch_1=&bRegex_1=false&bSearchable_1=true&iSortCol_0=0&sSortDir_0=asc&iSortingCols=1&bSortable_0=true&bSortable_1=true&_=1386231889586

http://web.toto.com/TestDataTableAjax1.php?sEcho=4&iColumns=2&sColumns=&iDisplayStart=36&iDisplayLength=189&mDataProp_0=0&mDataProp_1=1&sSearch=&bRegex=false&sSearch_0=&bRegex_0=false&bSearchable_0=true&sSearch_1=&bRegex_1=false&bSearchable_1=true&iSortCol_0=0&sSortDir_0=asc&iSortingCols=1&bSortable_0=true&bSortable_1=true&_=1386231889588

http://web.toto.com/TestDataTableAjax1.php?sEcho=3&iColumns=2&sColumns=&iDisplayStart=20&iDisplayLength=189&mDataProp_0=0&mDataProp_1=1&sSearch=&bRegex=false&sSearch_0=&bRegex_0=false&bSearchable_0=true&sSearch_1=&bRegex_1=false&bSearchable_1=true&iSortCol_0=0&sSortDir_0=asc&iSortingCols=1&bSortable_0=true&bSortable_1=true&_=1386231889587

http://web.toto.com/TestDataTableAjax1.php?sEcho=5&iColumns=2&sColumns=&iDisplayStart=50&iDisplayLength=189&mDataProp_0=0&mDataProp_1=1&sSearch=&bRegex=false&sSearch_0=&bRegex_0=false&bSearchable_0=true&sSearch_1=&bRegex_1=false&bSearchable_1=true&iSortCol_0=0&sSortDir_0=asc&iSortingCols=1&bSortable_0=true&bSortable_1=true&_=1386231889589

http://web.toto.com/TestDataTableAjax1.php?sEcho=7&iColumns=2&sColumns=&iDisplayStart=66&iDisplayLength=189&mDataProp_0=0&mDataProp_1=1&sSearch=&bRegex=false&sSearch_0=&bRegex_0=false&bSearchable_0=true&sSearch_1=&bRegex_1=false&bSearchable_1=true&iSortCol_0=0&sSortDir_0=asc&iSortingCols=1&bSortable_0=true&bSortable_1=true&_=1386231889591

http://web.toto.com/TestDataTableAjax1.php?sEcho=6&iColumns=2&sColumns=&iDisplayStart=58&iDisplayLength=189&mDataProp_0=0&mDataProp_1=1&sSearch=&bRegex=false&sSearch_0=&bRegex_0=false&bSearchable_0=true&sSearch_1=&bRegex_1=false&bSearchable_1=true&iSortCol_0=0&sSortDir_0=asc&iSortingCols=1&bSortable_0=true&bSortable_1=true&_=1386231889590
[/code]


In the example (http://datatables.net/release-datatables/extras/Scroller/server-side_processing.html) only 2 are done :

[code]
http://datatables.net/release-datatables/extras/Scroller/media/data/server_processing.php?sEcho=2&iColumns=5&sColumns=&iDisplayStart=2&iDisplayLength=81&mDataProp_0=0&mDataProp_1=1&mDataProp_2=2&mDataProp_3=3&mDataProp_4=4&sSearch=&bRegex=false&sSearch_0=&bRegex_0=false&bSearchable_0=true&sSearch_1=&bRegex_1=false&bSearchable_1=true&sSearch_2=&bRegex_2=false&bSearchable_2=true&sSearch_3=&bRegex_3=false&bSearchable_3=true&sSearch_4=&bRegex_4=false&bSearchable_4=true&iSortCol_0=0&sSortDir_0=asc&iSortingCols=1&bSortable_0=true&bSortable_1=true&bSortable_2=true&bSortable_3=true&bSortable_4=true&_=1386232219852

http://datatables.net/release-datatables/extras/Scroller/media/data/server_processing.php?sEcho=3&iColumns=5&sColumns=&iDisplayStart=22&iDisplayLength=81&mDataProp_0=0&mDataProp_1=1&mDataProp_2=2&mDataProp_3=3&mDataProp_4=4&sSearch=&bRegex=false&sSearch_0=&bRegex_0=false&bSearchable_0=true&sSearch_1=&bRegex_1=false&bSearchable_1=true&sSearch_2=&bRegex_2=false&bSearchable_2=true&sSearch_3=&bRegex_3=false&bSearchable_3=true&sSearch_4=&bRegex_4=false&bSearchable_4=true&iSortCol_0=0&sSortDir_0=asc&iSortingCols=1&bSortable_0=true&bSortable_1=true&bSortable_2=true&bSortable_3=true&bSortable_4=true&_=1386232222426
[/code]


Is it normal ? How is it manage ?

Thx

Replies

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    Can you link to a test page showing the issue please? I'm not sure what would cause this error. It doesn't look normal to m!

    Allan
  • fbolandfboland Posts: 18Questions: 0Answers: 0
    You can test it at : http://lerelaisimmobilier.com/TestDataTable.php
  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    Could you try the Scroller nightly please: http://datatables.net/download/build/dataTables.scroller.nightly.js ? I think this might already be resolved.

    Allan
  • fbolandfboland Posts: 18Questions: 0Answers: 0
    I hav the same problem with the Scroller nightly.

    It is online : http://lerelaisimmobilier.com/TestDataTable.php
This discussion has been closed.