I created a PHP AJAX pagination that works with an HTML table. I have a quick question about the AJAX GET answer. Currently, my pagination script returns the entire HTML table with every GET response, and then empties the DIV that contains the html table, and then puts the new HTML table in the DIV. My question is: is it better to return data in JSON or XML format and then build the table in JavaScript?
I would definitely create a table in javascript, it is scalability and just a good practice for your entire site. For example, think of mobile clients where every byte is precious.
json, , html-. :)
-, , . (JSON XML) , XML.
, - , . , - javascript, . :)
, , PEAR Pager - http://pear.php.net/package/Pager.
, -, , , .
Source: https://habr.com/ru/post/1778813/More articles:Array of CPPUnit Array - c ++Android: Nested tabactivities do not work with startActivityForResult - androidSelect all links - jqueryMsgstr "Тип сообщения уведомления был неожиданным." регистрируется SSBEA, и мое приложение никогда не вызывается - externalHow to download a file from the server - javaHard Threshold Queue Structure - collectionsThe network traffic of the iPad simulator does NOT go through the system proxy - iosRunning a thin web server as a Windows service - windowsButton call automatically - pythonHow to calculate computer architecture from the command line? - command-lineAll Articles