Should I use AJAX or get every data beforehand

Posted by rix501 on Stack Overflow See other posts from Stack Overflow or by rix501
Published on 2010-06-14T20:07:02Z Indexed on 2010/06/14 20:12 UTC
Read the original article Hit count: 120

Filed under:
|
|

I have a web app where I need to change a drop down list dynamically depending on another drop down list.

I have two options: Get all the data beforehand with PHP and "manage" it later with Javascript. Or get the data the user wants through AJAX.

The thing is, that the page loads with all the data by default and the user can later select a sub category to narrow the drop downs.

Which of the two options are better (faster, less resource intensive)?

© Stack Overflow or respective owner

Related posts about php

Related posts about JavaScript