Comments (8)
I might be wrong but, have you tried to specify noCache: false? By default it is true in AjaxProxy meaning that an extra parameter is added to avoid the call to be cached by cache servers so, if I'm not saying something stupid and HTML5 offline cache works in the same way as page cache, then that should make your call to be not retrieved from local offline cache.
To make it clear, you should invoke bundle as:
bundle = new Ext.i18n.Bundle({
bundle:'Application',
path:'resources',
lang: lang,
noCache: false // this should make the trick
});
Please let me know if you can make it work with that.
from ext.i18n.bundle-touch.
Thanks Max, I tried that. Has no effect.
from ext.i18n.bundle-touch.
John,
Try adding noCache: false, use GET method and also copy the url for your .properties files generated by Sencha to declare it in you cache manifest. Sencha adds some extra params to your calls (i.e. limit=25) so in order to make that call cached, you need to specify it in exactly the same way it is requested to server in your APP MANIFEST file.
from ext.i18n.bundle-touch.
Will try that,
thanks
from ext.i18n.bundle-touch.
buildURL: function(language){
var url = '';
if (this.path) url+= this.path + '/';
url+=this.bundle;
if (language) url+= '_'+language;
url+=this.resourceExt;
return url;
},
returns with 'resources/Application_en-US.properties' and that is in the manifest, and in the application cache in the browser
from ext.i18n.bundle-touch.
John,
Yes, 'resources/Application_en-US.properties' is the URL generated by
Bundle component but, Ext.data.Store - which is the underlying
implementation for the Ajax call - usually adds some extra parameters to
the request to server.
So, if you use Chrome to debug this in your desktop, when the .properties
file is requested the final URL has those extra params added to the call.
You need to copy that url and put it into the MANIFEST file.
Usually the request is something like:
http://localhost:8080/MyApp/resources/Application.properties?limit=25&filters=
Those extra parameters are always the same, so you can cache the server
call but if you don't specify the noCache param it also adds a random
number tied to _dc parameter which you cannot cache.
Ing. Maximiliano Fierro
elmasse
On Thu, Dec 15, 2011 at 5:06 PM, John B. Murphy <
[email protected]
wrote:
buildURL: function(language){
var url = '';
if (this.path) url+= this.path + '/';
url+=this.bundle;
if (language) url+= '_'+language;
url+=this.resourceExt;
return url;
},returns with 'resources/Application_en-US.properties' and that is
in the manifest, and in the application cache in the browser
Reply to this email directly or view it on GitHub:
from ext.i18n.bundle-touch.
Stepping through code now. Looks promising.
Thank you
John
(617) 504-1531
Sent from my iPhone
On Dec 15, 2011, at 3:22 PM, Maximiliano Fierro
[email protected]
wrote:
John,
Yes, 'resources/Application_en-US.properties' is the URL generated by
Bundle component but, Ext.data.Store - which is the underlying
implementation for the Ajax call - usually adds some extra parameters to
the request to server.So, if you use Chrome to debug this in your desktop, when the .properties
file is requested the final URL has those extra params added to the call.
You need to copy that url and put it into the MANIFEST file.Usually the request is something like:
http://localhost:8080/MyApp/resources/Application.properties?limit=25&filters=Those extra parameters are always the same, so you can cache the server
call but if you don't specify the noCache param it also adds a random
number tied to _dc parameter which you cannot cache.
Ing. Maximiliano Fierro
elmasseOn Thu, Dec 15, 2011 at 5:06 PM, John B. Murphy <
[email protected]wrote:
buildURL: function(language){
var url = '';
if (this.path) url+= this.path + '/';
url+=this.bundle;
if (language) url+= '_'+language;
url+=this.resourceExt;
return url;
},returns with 'resources/Application_en-US.properties' and that is
in the manifest, and in the application cache in the browser
Reply to this email directly or view it on GitHub:
Reply to this email directly or view it on GitHub:
#1 (comment)
from ext.i18n.bundle-touch.
That was it!
Thanks Max
from ext.i18n.bundle-touch.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ext.i18n.bundle-touch.