2

I'm creating light weight web-applications based on HTML and Javascript (for example a contact book with around 500 to 1000 entries). I have a simple HTML form to search in the contact list based on a few letters.

I want to store the entries on a flat file (.csv, .xml, . json or so) and then manipulate it with javascript to retreive the contact informations without any Ajax+php call.

My questions are:

  • Which is the best flat format to be manipulated with Javascript?
  • Is Javascript siutable for this kind of use, or I'm going to crash the user browsers by performing data research in my page?

Thanks for your advices! Nicolas

Nicolas Hefti
  • 303
  • 2
  • 9

1 Answers1

1

json is best option and it is designed for javascript.

Below are the sample json structure that you can use. { users: [ { un: 'johndoe', contactno: 123456 }, {un: 'acme', contactno: 4523456 }... ] }

json list can support large number of records and performance in performing operation on json list is quite fast.

make sure you are not performing dom manipulation during operation other performance degrades.

SN003
  • 11
  • 2