If you want to know how not to do AJAX…

Check out http://www.sccm-tools.com/ in Google Chrome. I’m not quite sure how it works just yet, but it’s certainly spectacular. Every second or so, it grabs a gradually larger and larger request in a runaway fashion.

I have a feeling it has something to do with storing the state of the page or something in its source, but wow. After three minutes, it’s doing 60KB/s.

Want to know how I found this? I left it open for a few MONTHS on my work PC and showed up as an incredibly huge user of bandwidth. Whoops!

After 20 minutes, it’s waiting for one request to finish then starting straight away, doing approximately 100KB/S.

After an hour it hasn’t sped up - probably limited by local or remote bandwidth - but the request sizes are continuing to increase.

I’m going to play with this at home when I’ve got access to more tools, not sitting in a week full of boring training, but … wow.

Update: After someone’s comment on Facebook and looking at it in Wireshark, it looks like ASP.NET’s View State is partially to blame. It puts a hidden variable __VIEWSTATE into forms so as to keep the previous values of fields. Normally this isn’t so bad, but when you combine it with a POST request every second or so, and what looks to be a continually updating item, the results speak for themselves. This developer’s not the only one that’s had this issue, but ouch.



#AJAX #ASP.NET #fail #Web Design