I have several update methods in a javascript file, used for updating my ajax application, like so:
function updateByPk(layer, pk) {
url = "get_auction.php?cmd=GetAuctionData&pk="+pk+"&sid="+Math.random();
update(layer, url);
}
function updateByQuery(layer, query) {
url = "get_records.php?cmd=GetRecordSet&query="+query+"&sid="+Math.random();
update(layer, url);
}
function updateByPage(layer, query, pg) {
url = "get_records.php?cmd=GetRecordSet&query="+query+"&pg="+pg+"&sid="+Math.random();
update(layer, url);
}
I am wondering if it would be more efficient to do things like pagination and such strictly through php, simply by reloading the page, rather than using an ajax method. I am not sure which method is more efficient, or if there are advantages and disadvantages to each.