Bug Tracker

Modify

Ticket #10529 (closed bug: invalid)

Opened 19 months ago

Last modified 12 months ago

iOS 5 report error when $.ajax triggered

Reported by: genius_tse@… Owned by: genius_tse@…
Priority: low Milestone: None
Component: ajax Version: 1.4.4
Keywords: Cc:
Blocking: Blocked by:

Description

this problem only found in Mobile Safari over iOS5. code is working on iOS4

Error will prompt from console like below when ajax triggered

"XMLHttpRequest cannot load http://xxxxxx?xxx=&xxxx. Cannot make any request from null."

Code to fire ajax request:

var saveUrl = 'a.php?action=login&u=a&p=b';
$.ajax({data: $("#theForm").serialize(),
            type: "POST",
            url: saveUrl,
            timeout: 20000,
            contentType: "application/x-www-form-urlencoded;charset=UTF-8",
            dataType: 'json',
            success: function(data) {
                // do nothing
            }
        });

Change History

comment:1 follow-up: ↓ 2 Changed 19 months ago by timmywil

  • Owner set to genius_tse@…
  • Priority changed from undecided to low
  • Status changed from new to pending
  • Component changed from unfiled to ajax

Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket.

Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, use this boilerplate:  http://jsfiddle.net/FrKyN/ Open the link and click to "Fork" (in the top menu) to get started.

comment:2 in reply to: ↑ 1 Changed 19 months ago by jbosch

low priority? none of my iphone html5 games works now... when it is expected to release a bugfix for this issue?

thanks!

Replying to timmywil:

Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket.

Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, use this boilerplate:  http://jsfiddle.net/FrKyN/ Open the link and click to "Fork" (in the top menu) to get started.

comment:3 Changed 19 months ago by trac-o-bot

  • Status changed from pending to closed
  • Resolution set to invalid

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

comment:4 Changed 16 months ago by anonymous

This issue is still present in latest jQuery version with on my iPad 2.

comment:5 Changed 16 months ago by anonymous

found a working (the bug shows up) jsfiddle at stackoverflow:  http://jsfiddle.net/ambiguous/zWC3R/

(interestingly the bug also shows up when trying to change the jquery version within jsfiddle - so jsfiddle alone would also be a good example)

source:  http://stackoverflow.com/questions/7942739/jquery-ajax-functions-not-working-in-ios-5-safari-ipad

comment:6 Changed 16 months ago by anonymous

after rebooting the ipad it worked again for some time without any problem - but after a little while the bug was present again.

comment:7 Changed 13 months ago by anonymous

Has somebody found a bugfix for this problem?

comment:8 Changed 13 months ago by anonymous

I also had this issue verbatim. I rebooted my iPad and the issue went away which indicates to me the bug maybe with Safari.

comment:9 follow-up: ↓ 10 Changed 13 months ago by rwaldron

Seems to me that the problem is not being caused by jQuery - if it were, the issue would be consistently reproducible. Please stop posting "me too" unless you have verifiable evidence.

comment:10 in reply to: ↑ 9 ; follow-up: ↓ 11 Changed 13 months ago by ewatje@…

I have managed to reproduce it consistently as follows:

  1. Open a page with an $.ajax() call and a link to a PDF
  2. Click link to download PDF
  3. Open PDF in iBooks, effectively puts Safari in background
  4. Put Safari in foreground, will show the PDF
  5. Press back button to go back to the page with $.ajax() call.

Restarting Safari solves the issue until I do the above again. Maybe this helps.

Replying to rwaldron:

Seems to me that the problem is not being caused by jQuery - if it were, the issue would be consistently reproducible. Please stop posting "me too" unless you have verifiable evidence.

comment:11 in reply to: ↑ 10 Changed 12 months ago by vanly007@…

Replying to ewatje@…:

I have managed to reproduce it consistently as follows:

  1. Open a page with an $.ajax() call and a link to a PDF
  2. Click link to download PDF
  3. Open PDF in iBooks, effectively puts Safari in background
  4. Put Safari in foreground, will show the PDF
  5. Press back button to go back to the page with $.ajax() call.

Restarting Safari solves the issue until I do the above again. Maybe this helps.

Replying to rwaldron:

Seems to me that the problem is not being caused by jQuery - if it were, the issue would be consistently reproducible. Please stop posting "me too" unless you have verifiable evidence.

I have similar problem, there's a solution that to view pdf file in a popup dialog, but you'll receive safari popup blocker complaint.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.