Skip to main content

Bug Tracker

Side navigation

#15248 closed bug (migrated)

Opened September 26, 2014 02:52PM UTC

Closed October 21, 2014 01:01AM UTC

Jquery caching DELETE Request on Android

Reported by: knobli Owned by:
Priority: undecided Milestone: None
Component: ajax Version: 1.11.1
Keywords: ajax, phonegap, android, delete Cc:
Blocked by: Blocking:

I'm trying to use ajax() from jquery to send a DELETE Request on Android in a Phonegap App. Like this:

function removeObject(id) {
        type : "DELETE",
        url : getAPIUrl() + '/object.php',
        data : {
            'id' : id
        cache: false
    }).done(function(data) {
        if (data.success) {
        } else {

It looks like the response will be cached, the first request is successful and will be sent to the backend, the second one with another id, is also successful but never get to the backend.

There is no such issue with the same js in Chrome and on iOS.

My workaround is to put a Math.random() variable on the ur:

		type : "DELETE",
		url : getAPIUrl() + '/object.php?' + Math.random() * Math.random(),
Attachments (0)
Change History (1)

Changed October 21, 2014 01:01AM UTC by m_gol comment:1

resolution: → migrated
status: newclosed