jquery - 为什么我的 jquery.ajax() 函数在上传到实时服务器时显示 'Aborted'

标签 jquery ajax firebug abort

为什么我的 jQuery.ajax() 函数在我的本地服务器上运行良好,但上传后我现在在 Firebug 中收到“中止”响应?

enter image description here

ajax 函数正在调用同一个域,如下所示

jQuery.ajax({
  url: homeUrl+'/engine/check/',
  data: jQuery('#post').serialize(),
  type: 'post',
  beforeSend:function(){
    jQuery('#checker span').text('checking status...').parent().show();
  },
  success: function(data){
    if(data == 'not_gallery'){
      jQuery('#checker').hide();
    }

    if(data == 'no_folder'){
      jQuery('#loader').hide();
      jQuery('#checker span').html('please ensure you have chosen a folder to connect to this gallery');
    }

    if(data == 'complete'){
      jQuery('#loader').hide();
      jQuery('#checker span').html('Gallery Active');
    }

    if(data == 'in_crunch'){
      jQuery('#loader').show();
      jQuery('#checker span').html('Crunching in progress. This may take a while...');
      refreshIntervalId = setInterval( 'check_poll()', 15000 );
    }

    if(data == 'init_crunch'){
      jQuery('#loader').show();
      jQuery('#checker span').html('Crunching in progress. This may take a while...');
      jQuery.post(homeUrl+'/engine/crunch/', jQuery('#post').serialize(), function(data){
        if(data == 'done'){
          jQuery('#loader').hide();
          jQuery('#checker span').html('Gallery Active');
        }                                                                                     
      });
    }
  }
});

这可能是我嵌套的ajax函数吗?

最佳答案

在这种情况下,我遇到这个问题是由于 apache Web 服务器配置造成的。

服务器配置为接受 x mb 的数据,而我的有效负载超过 x。

检查访问日志是否发生这种情况。

在本例中,Firebug 在 POST 请求上显示“已中止”,而 chrome 开发工具显示“待处理”。

关于jquery - 为什么我的 jquery.ajax() 函数在上传到实时服务器时显示 'Aborted',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6412660/

相关文章:

javascript - div 中的 Php 输出

jquery - 如何使用 jquery 使用下拉菜单向下滚动屏幕?

javascript - 使用 javascript 和 AJAX 实现 Shoutbox

jquery - parsererror 语法错误 : Unexpected token < - Load Partial View using jQuery Ajax in ASP. NET MVC 4

javascript - 在 Firebug/Chrome 中获取从一个断点到另一个断点的 Javascript 或 jQuery 堆栈跟踪?

css - 特定 css 类会影响哪些元素

javascript 函数不适用于 Rails

javascript - 当鼠标移动到屏幕上的任何位置而不仅仅是元素本身时,如何显示 div?

javascript - 指示 jquery 内容表的顶部标题

javascript - 如何将javascript变量发送到php以更改上传文件的文件名?