I have a search page that allows the users to filter other users by various categories (age, gender, country, region, ethnicity, etc). The first time the search function is called it gets all the possible values for each category from the database. Just wondering though...
Is it better to POST this data back each time the page is re-loaded (in a serialized hidden form field) or should I retrieve this information from the database every time the page is loaded.
If i understand the situation correctly, the serialized POST option would increase the sites bandwidth consumption as the data is traveling from the users machine, to the server and back to the users machine again. On the other hand, querying the database everytime would increase the load on the server/database, but would only use half the bandwidth.
If thats the case, what option should I go for... I know that it probably doesn't make much difference for the amount of traffic i'll be getting, but I want to learn the best methods of doing this sort of stuff :P