0

I am using Extjs 4.0.7.

The tooltip(Ext.tip.Tooltip) to show some message is coming correctly. When I check in the network tab of the browsers development tools, it is sending multiple requests. But I want a single request to be sent.

couponTpl: function (value, metaData, record, rowIndex, colIndex, store, view) {
    view.tip = Ext.create('Ext.tip.ToolTip', {
        target: view.el,
        delegate: view.itemSelector,
        anchor: 'left',
        trackMouse: true,
        dismissDelay: 100,
        scope: this,
        showDelay: 300,
        height: 300,
        hideDelay: 0,
        listeners: {
            beforeshow: function updateTipBody(tip) {
                var record = view.getRecord(tip.triggerElement);
                tip.update('<div><span> record.data.offer</span></div>');
            }
        }
    });
    return value;
}

checkdis

Satish
  • 537
  • 2
  • 9
  • 21

1 Answers1

0

You should enable a caching mechanism on the server side.

record.data.offer contains image tags. Default behavior is that the image will automatically be loaded. But if you enable a caching mechanism this will be resolved by the browser.

One of these mechanisms is to let the server set an expiration date. A period in which the content is valid/up-to-date.

Then the browser checks internally if the content has expired it fetches the image again. Else it's coming from the cache. Here is an example using apache

Another (more advanced/complex) mechanism is using eTags

Community
  • 1
  • 1
VDP
  • 6,340
  • 4
  • 31
  • 53