I think that the implementation for getting the web_src used in esi.js can be improved, and for my implementation, has to be changed. In esi.theme.inc::theme_esi_tag there exists code to set Drupal.settings.esi. I don't think this is required and frankly might incur a slight overhead. I request that the code that invokes the settings include (occurrences of:
drupal_add_js(array('esi' => array($css_id => $ajax_src)), 'setting');
be removed, and that in esi.js these lines:
if (Drupal.settings.esi[css_id] == 'undefined') {
return;
}
var web_src = Drupal.settings.esi[css_id];
be replaced with this:
var web_src = $("esi\\:include").attr('src');
Currently I don't see a reason to use the Drupal.settings.esi method, and I think that probably the reason that that method was used was because of the percieved inability to target the tag. Ideas?
Comments
Comment #1
mikeytown2 CreditAttribution: mikeytown2 commentedSource of the js code: #1326104: Add ajax option and configurable defaults
That's probably a correct guess.
Create a patch and/or start a sandbox :)
Comment #2
manarth CreditAttribution: manarth commentedThe 7.x branch is using the jQuery ESI plugin to provide an AJAX fallback…it could probably be back-ported to 6.x-2.x too.
Comment #3
manarth CreditAttribution: manarth commentedComment #3.0
manarth CreditAttribution: manarth commentedChanged 'Currently I don't see a reason to use your method' to 'Currently I don't see a reason to use the Drupal.settings.esi method'
Comment #4
dstuart CreditAttribution: dstuart at Axis12 Limited commentedNo longer supported