PDA

View Full Version : cache extjs, so no need to load again.



flatburger
15 Oct 2007, 10:16 PM
i use firefox, and exjs.com

is it possible to cache the extjs script library like ext base, ext-all, so no need to download each time

i think this is important in deployment mode

can help?

SeaSharp
16 Oct 2007, 1:04 AM
You need to look at how to configure the cache settings within your web server. If IIS, right click on the directory containing the Ext .js files, move to the http-headers tab and enable content expiration.

Remember that once a browser has cached a .js file locally you can no longer force* end-user browsers to pick up a fresh copy, for that reason you might want a relatively short cache period on your own js files that are likely to require more frequent patching than the Ext js files.

* = In an extreme case you could alter the js directory referenced from the main htlm page, then browsers would have to pick up a critical .js fix that you wish to push out to your user community.

mango
22 Aug 2008, 6:04 AM
I have created a Store object with param as proxy url for a combobox control. First time, I got the response from server, and next time onwards, I am getting the response from the cache.

My question is, how can I get the response always from the server, not from the cache.

code sample:

editor: new vExt.form.ComboBox({
editable: false,
maxLength: 256,
listWidth: 128,
lazyRender:false,
triggerAction: 'all',
listClass: 'x-combo-list-small',
displayField: 'display',
valueField: 'value',
store: new vExt.data.Store({
proxy: new vExt.data.HttpProxy({url: <url>}),
reader: new vExt.data.JsonReader({
root: 'record'}, [
{name: 'value', type: 'string'},
{name: 'display', type: 'string'}
])
})



Please help me out in this.

ThorstenSuckow
22 Aug 2008, 7:58 AM
I have created a Store object with param as proxy url for a combobox control. First time, I got the response from server, and next time onwards, I am getting the response from the cache.

My question is, how can I get the response always from the server, not from the cache.

code sample:

editor: new vExt.form.ComboBox({
editable: false,
maxLength: 256,
listWidth: 128,
lazyRender:false,
triggerAction: 'all',
listClass: 'x-combo-list-small',
displayField: 'display',
valueField: 'value',
store: new vExt.data.Store({
proxy: new vExt.data.HttpProxy({url: <url>}),
reader: new vExt.data.JsonReader({
root: 'record'}, [
{name: 'value', type: 'string'},
{name: 'display', type: 'string'}
])
})



Please help me out in this.


set the "disableCaching" property to "true":


proxy: new vExt.data.HttpProxy({
url: <url>,
disableCaching : true

})