I will use AJAX for a pagination script and wanna make this script as "data consumption saving" as possible. Therefore my idea is to just load the items for the chosen page and just load empty li-items with data-id for all items not showing.
The question is if this really is data consumption saving if the php file called by ajax is going through all the data anyway.
I guess the question is; does the data count in how much content there is in the ajax-response, or is it counted by how big the ajax-call to the php file is?
Do I save any data by leaving a lot of li-items empty or could I just as good add the content since it loaded in the ajax-call anyway?
Does anyone understand how I mean?
People always want code example:
jQuery.post(ajaxurl, 'action=load_items', function(response)
{
// Is it the action 'action=load_items'
// that consumes data? Or is it the amount
// of data coming out in the response?
});