A couple of quick questions on Ajax and about where I been
I thought I would take a break from my crazy life on working way to many hours without over time and post an answer to some questions I have been getting a lot lately.
Ajax Questions
What is the difference between Microsoft.XMLHTTP and Msxml2.XMLHTTP?
The simple answer is: they are different versions! You can see what is exactly in those versions by looking at the MSXML API History located on MSDN here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/html/9e353ac7-ab8b-44aa-9fbc-12ca715ab1e7.asp.
Is there any specifcation documents on Ajax?
Of course there is always one over on the W3C. You can see the working draft of The XMLHttpRequest object specifcation here: http://www.w3.org/TR/XMLHttpRequest/. It is a good read, normally I do not say that about the W3C documents. It is probably the first specification document that I agreed with!
The sad thing is we alway will have to code to the previous implementations even if the new browsers follow it exactly! I still see IE5.X and Win 98 in my logs! It is probably people like me that run on Virtual PC!
Or maybe it is on of my wife's clients who has a windows 3.1 machine of their breakfast bar with solitare open 24/7! I love the burnt in images of the cards on the screen. You can always find the one you need in a ghoslty image. To bad you can not select it!
My reponseText from the server is always the same!
Are you setting no-cache headers? That is my first response to anyone that asks that. Georgios Markakis had a great comment on this old blog on this same topic. Georgios said to use xmlhttp.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT"); That is a lot better than the random number/timestamp generation. Ah use all three to be safe!! lol
Personal Questions
Why have you not been blogging?
I been busy as can be. Been coding a lot lately (more than I would like). I been working on my house. I replaced windows, replaced doors, painting, replaced trim, and other general maintanence. I am a geek that can sure use a lot of spackle!
Are you writing another book?
I have a couple of TOCs (Table of contents) started, but I been working 70+ hour weeks including weekends. That means I have had little time to actually write. My wife expects me to do some stuff around the house! (stuff I mentioned above.) She is also pregnant, so that makes it worse with all of those hormones flowing! Those evil stares that I get while I sit on the couch watching college basketball can burn a hole right through you!
Dave Crane must not be sleeping again. He has been cracking the whip with JavaRanch's own Bear Bibeault popping out two books Ajax in Practice and Prototype and Scriptaculous Quickly.
Are you on the market?
I am starting to job hunt to get away from this hellish job! I love what we are doing, I would wish that the execs realized that we are 5 developers and not 20. I am looking for either telecommuting or working in the Baltimore/Northern Virgina/DC market is my goal. Wife my wife bein due at the end of May, I am not looking to move from my home in Maryland.
Where do you hang out online to answer Ajax Questions?
I some how find time to answer questions on JavaScript/Ajax/CSS/HTML here on JavaRanch, on ASP.NET, CodingForums.com and Webdeveloper.com! Oh and I am on a couple of the Ajax groups on google.What is your biggest pet peeve about Ajax?
I am tired of seeing people using Ajax just to use it. There are a lot of people coding things that have no benefit at all. Using the XMLHttpRequest object to load plain text content on the page load is making the load time probbaly even longer!
Another pet peeve is I like to bookmark things. I love to send URLs to people on IM so they can see the nerdy stuff I am reading about. We need to remember that we hated coding frames for the same exact reason!
Eric Pascarello
Coauthor of Ajax In Action
Moderator of HTML/JavaScript at www.JavaRanch.com
Author of: JavaScript: Your Visual Blueprint for building Dynamic Web Pages