coasters2k
07-17-2006, 10:54 PM
I'm designing a script that a user enters a zip code and the page then fetches and dynamically displays another PHP page that says the location info (city/state) for that zipcode...
Instead of doing it that way I was thinking of creating a XML file and having it return the info from that file instead (for true AJAX style), however the XML file would well be over 2mb probably (thats the size of the mySQL zipcode database) and have over 40k records.
So is making my AJAX script call a 2MB XML file a bad idea? Does the end user have to download the entire XML file and process it in whole (if so it'd definitely not be a good idea) or should I just stick to what I already have in mine, querying the database and printing the info on another page and inserting that page into the current one with the innerhtml stuff...? I guess my question has to do with my ignorance of AJAX and XML's inner workings. Thanks!
Instead of doing it that way I was thinking of creating a XML file and having it return the info from that file instead (for true AJAX style), however the XML file would well be over 2mb probably (thats the size of the mySQL zipcode database) and have over 40k records.
So is making my AJAX script call a 2MB XML file a bad idea? Does the end user have to download the entire XML file and process it in whole (if so it'd definitely not be a good idea) or should I just stick to what I already have in mine, querying the database and printing the info on another page and inserting that page into the current one with the innerhtml stuff...? I guess my question has to do with my ignorance of AJAX and XML's inner workings. Thanks!