Reputation: 9537
I have a web app working fully Ajax wise. The user has the opportunity to apply a location filter. He or she can enter a city or region for instance. If that variable is set, I will use it as parameter in all my ajax calls.
My question is as follows: what is the best "place" to store that variable?
I hesitate between two solutions:
If there is a better idea out there I take it.
Upvotes: 0
Views: 48
Reputation: 349042
Use a session variable. This value is assumed to be near-constant over the session, so you shouldn't send it at every request.
Upvotes: 3