Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Ajax success callback bug on iPhone when the application is offline #926

Closed
ghost opened this issue Jan 31, 2011 · 9 comments
Closed

Ajax success callback bug on iPhone when the application is offline #926

ghost opened this issue Jan 31, 2011 · 9 comments

Comments

@ghost
Copy link

ghost commented Jan 31, 2011

We create a manifest file for an offline application and it works on desktop browsers.
But, when we were tested on iPhone 3GS, the ajax callback doesn't returned the data from server.

ChangePage function causes the problem, please change the following lines:
https://github.com/jquery/jquery-mobile/blob/master/js/jquery.mobile.navigation.js#L483
to

success: function( html, status, xhr ) {
if (html == undefined && status == 'notmodified')
{
    html = xhr.responseText;
}
@scottjehl
Copy link

Hmm... should html ever be undefined in the success callback? Do you think this is more of a jQuery Core issue?

@ghost
Copy link
Author

ghost commented Jan 31, 2011

Thanks for your response!

The html will always be undefined in the success callback if the browser state is offline, supports manifest file and loads from cache. Especially in the case of mobile devices.

Yes, it seems to be a jQuery Core issue, but I'm afraid that they will never deal with this problem (or at least not as soon as we need a solution).

If you could fix this issue, jQueryMobile would be able to run on an offline html5 supported (mobile) device.

@ghost
Copy link
Author

ghost commented Jan 31, 2011

Sorry, I accidentally closed this issue and I can't reopen it. Please someone...
Thanks :)

@scottjehl
Copy link

reopened

@ghost
Copy link
Author

ghost commented Feb 8, 2011

Hi,
What's up with this issue? Are there any news?
Thanks!

@jcorporation
Copy link

Hi,

would the above patch included in the next release?
In a4.1 the patch worked for me.

Thanks

@toddparker
Copy link
Contributor

Hi all - is this still an issue with the latest build? Thinking this is resolved.

@jcorporation
Copy link

For me it works.

@toddparker
Copy link
Contributor

Yeah, ok. Thanks @jcorporation. I'm going to close as fixed, but we're happy to re-open if someone posts a test page showing that we still need to look at this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants