Forum WTF - Unecessary AJAX request?



  • I was at the forum frontpage and rather absent-mindedly played with the expand/collapse button () on the category headlines - when I noticed it actually issues an AJAX request every time I expand or collapse a category. The response doesn't even contain meaningful data (whatever that would be in this context) but just the equivalent of "OK".

    I can't seem to wrap my mind around why one would possibly call back the server just to hide a few DIVs. Does anyone else have ideas what that could be good for?



  • You must be new here.



  • Most likely, it sends a request to save your preference. The next time you visit, it should remain collapsed.

    This is not the only forum system that does this, a few others do too.



  • Some customer or project manager probably didn't know the difference between "AJAX" and "DHTML", demanded that the site use AJAX to do that feature.  Developers laughed at the guy, but testers did their job thoroughly (and probably had a grudge against the developer).



  • The ASP.NET AJAX framework was not designed for your typical developer, instead its like a set of crappy training wheels that try to ease the developer into thinking in "AJAX".

    The result is an epic fail 291kb  JS runtime on each page and a  bunch of crappy AJAX controls.

     While I love .NET, I find the AJAX framework total crap, and I use my own custom HTTPHandlers to handle AJAX requests.

     EDIT:

    By the way, what is happening is that each category is stored in a "UpdatePanel". This panel refetches the HTML content within it when you open and close the tab. This does mean you get the most up to date information without a refresh, but I still think hiding the DIV is saner.



     


     


Log in to reply