function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ArleneArlene 

sforce.apex.execute hangs in Chrome

This is a new problem (about 3 weeks old) on pages in a Customer Portal site which have run for at least 18 months without an issue.  Has anyone seen anything similar?

 

In our header document for our Customer Portal, the html file contains the following lines (partial code only).  The normal purpose for these lines is to add branding and menus to a standard List View page for Products by reading a Visualforce page used as a template.

 

<div id="headerContainer"></div>
    <script type="text/javascript">
    var isNativePage = window.location.href.indexOf('salesforce.com') > -1;
    var startIdx = document.cookie.indexOf('; sid=') + 6;
    sforce.connection.sessionId = document.cookie.substring(startIdx, document.cookie.indexOf(';', startIdx));
    if ( isNativePage && window.location.pathname.indexOf("/a0c") != -1 ) {
        var headerHtml = sforce.apex.execute("VisualforceProxy", "getTestContents", {});
        document.getElementById("headerContainer").innerHTML = headerHtml;
    }

 

However, to simplify issue for testing, I am returning a string rather than reading a VF page.  This is the class read using sforce.apex.execute above.

 

global class VisualforceProxy {

    webservice static String getTestContents() {
        return '<p>See Me!</p>';
    }

}

 

When this code executes as part of a page loaded with the address  

 

https://cs15.salesforce.com/a0c?fcf=00B300000083eUg

 

it should display the list view of the products, which can contain images of the products.  This works fine in IE (versions 7-10), and in Firefox.  It even works well in Chrome if there are very few images on the page or if most of the images are already cached.  when it works, "See Me!" displays at the top of the page in place of the normal branding and menus, and the list view displays as expected. However, if there are several images on the page (variable, based on network speed, I believe), the sforce.apex.execute hangs and never returns.  Is anyone else seeing this as a new behavior with Chrome?