Summary:

Users may experience a delay when attempting to load screens that are launched using the jQuery load() function. This includes the Workflow and New Line Item screens.

Symptoms:

Poor performance may be seen when loading certain screens, especially when the user is not accessing CRM on a local area connection. On examination, a large number of HTTP requests for Sage CRM JavaScript include files will have an underscore parameter (_) passing the current timestamp. As such, requests for these files have to be fulfilled by the server, rather than retrieved from the cache. This results in dramatically increased loading times when a customer is accessing CRM over a relatively slow connection. As an example, try loading a workflow in Live, or navigating to the New -> Line Item screen.

Cause:

Version control of JS include files is accomplished using a separate parameter ("Version"), so this parameter with the timestamp value would appear to be unnecessary. An example request would appear in a HTTP debugger as follows:

URL Method Result Type Received Taken Initiator Wait‎‎ Start‎‎ Request‎‎ Response‎‎ Cache read‎‎ Gap‎‎
/crm/js/lib/jquery.rotate.1-1.js?_=1390996751405 GET 200 application/x-javascript 2.26 KB 16 ms JS Library XMLHttpRequest 499 0 16 0 0 468

The issue is caused by usage of the jQuery load() function. By default, this will disable caching of JS includes by appending a timestamp parameter whenever a webpage is loaded using this function.

Documentation is available here:
http://api.jquery.com/jquery.ajax/


Resolution:

A workaround is available; caching can be enabled by default by editing the ajaxSetup function in \CRM\WWWRoot\js\lib\jquery-1.8.2.min.js.

p.ajaxSetup(

    cache:true, 
    accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},
    contents:{script:/javascript|ecmascript/},
    converters:{"text script":function(a){return p.globalEval(a),a}}
})

It's unclear as to whether enabling caching will cause issues in other areas of Sage CRM. The majority of requests for external files include a Version parameter that could be used to control caching, thereby rendering the workaround shown safe, but this has not been extensively tested.


Status:

This issue was resolved in Sage CRM 7.2f.