How does stackoverflow loads its available tags on the tag input below when you are asking a question? do they populate the available tags when the page loads or they make a request per user input or user key press? I am planning to implement the same way in my application but I have no idea on how will I achieve this thing.
Share
They definitely do not load all available tags on page load, as there are way too many. I ran a quick test under the web console in Firefox, and it appears they do a JSON request using AJAX. An example would be:
https://stackoverflow.com/filter/tags?q=visual&newstyle=true&_=1359502308905
Which results the response:
They also seem to lag a bit, so they’re not firing off too many HTTP requests at once. You have to stop typing for a second or two before it does the request.