I have been working on a project, where I'm making AJAX call to load 100's of record from database, which would then be rendered on a slider.
To be precise, the data I would be fetching is the 'Image Path' for all the images, and other details such as 'the size of slider thumbnail', 'number of thumbnails to show', etc.
For this list of data, I have 2 options: 1. To generate the HTML on the server-side and send it to client, where it will be applied to the slider. 2. To generate and send json data to client. Parsing this json data and generating the Slides for the Slider.
I'm confused as to which approach to use, for better overall performance for client/server. Google search and reading articles states me that using json data is a faster. However, after performing few initial test to fetch and render HTML shows that generating HTML on server side and sending it to client for rendering is much faster than sending the json data to the client and preparing the HTML for rendering.
It would be great if someone would put a light on this issue, where the server gets about 4k-5k hits per hour.