Posts Tagged ‘ajax’

Interesting little jQuery ajax POST bug with Chrome

April 29, 2010 Leave a comment

After adding support for POST requests to my back end, of course I wanted to make the front end use it. so I switched the ajax requests to use POST instead of get. Worked fine in Firefox so I was happy. Tried it in Google Chrome this morning and I found I was not getting any data with the post request.

After some digging around the jQuery forums I found that adding data:null to the ajax setup helped things along. Something to do with jQuery using an uninitialized variable or something. Whatever, it fixed it!

So now the ajax setup in my index page’s ready function looks like this:

   cache: false,    
   data : null      
Categories: Coding, jQuery Tags: , , , ,