简体   繁体   中英

Javascript - AJAX Request Cancelled after a While over SSL

I am using the Prototype JS framework to do AJAX calls over an SSL connection. At first, the AJAX performs fine. However, if the page is live for more than 10 seconds or so, the AJAX requests fail to return successfully and have a status of 0, or 'canceled' in the Network Inspector...

在此处输入图片说明

This happens across multiple browsers and I've tried other solutions relating to .gz files, all to no avail.

Another hints is that once the AJAX requests begin to fail, the green lock symbol turns to a grey triangle with a warning symbol (insecure content). Any pointers please?

The AJAX requests were being redirected by our european switcher. Changed this:

   $clearCurrentUrl = str_replace(array('/index.php'), '', Mage::helper('core/url')>getCurrentUrl());
   $clearRedirectUrl = str_replace(array('/index.php'), '', $redirectUrl);

to this...

   $clearCurrentUrl = str_replace(array('/index.php', 'https://', 'http://'), '', Mage::helper('core/url')->getCurrentUrl());
   $clearRedirectUrl = str_replace(array('/index.php', 'https://', 'http://'), '', $redirectUrl);

And it works a charm now! :) Thx folks.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM