fixed caching in a couple of places:

- user.php was not reloaded if (session-)preferences changed eg. language via select-box in login, because we used Expires header, but did not force a different url
- (user|config|images).php now has etag on url, to force reload by browser as we use an Expires header (changed images still need Admin >> clear cache to rebuild image cache)
- preferences are now loaded via a cachable GET request
This commit is contained in:
Ralf Becker
2014-01-18 17:43:15 +00:00
parent 8276a2a448
commit 5a8b145b7f
8 changed files with 57 additions and 39 deletions

View File

@ -69,9 +69,9 @@ egw.extend('json', egw.MODULE_WND_LOCAL, function(_app, _wnd) {
/**
* Sends the assembled request to the server
* @param {boolean} [async=false] Overrides async provided in constructor to give an easy way to make simple async requests
* @returns undefined
* @param {string} method='POST' allow to eg. use a (cachable) 'GET' request instead of POST
*/
json_request.prototype.sendRequest = function(async) {
json_request.prototype.sendRequest = function(async,method) {
if(typeof async != "undefined")
{
this.async = async;
@ -95,7 +95,7 @@ egw.extend('json', egw.MODULE_WND_LOCAL, function(_app, _wnd) {
context: this,
data: request_obj,
dataType: 'json',
type: 'POST',
type: method || 'POST',
success: this.handleResponse,
error: function(_xmlhttp, _err) {
this.egw.debug('error', 'Ajax request to', this.url, ' failed:',