Images - Alternative to reduce JSON?

Images - Alternative to reduce JSON?

stetheyidstetheyid Posts: 8Questions: 0Answers: 0
edited November 2010 in General
In a table I'm implementing I have two columns which contain small icons. The server side ajax file works out which image is to be used on each row and the html is included in the JSON returned to datatables to parse and render from.

To reduce the JSON data would I be better replacing the html with a number/code which datatables then replaces with the image as its rendering?

Would that be more efficient or not?

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    I doubt that it will make a significant amount of difference, unless you are expecting very high traffic volumes. How many bytes are saved for each request, and how many requests per min or hour are you expecting? Having said that, it's quite readily possible to do what you want using fnRender: http://datatables.net/usage/columns#fnRender .

    Allan
This discussion has been closed.