diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2016-08-27 12:38:15 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2016-08-27 21:02:08 +0200 |
commit | 73bc108451169aa8ba95eba3749c6450de2ded2e (patch) | |
tree | 49cc8f70889aa2760b0bad356640e5626c4eac85 /apps/theming/js | |
parent | c40df1d9904be51db00bdcf8bc9b3f85511fb24c (diff) | |
download | nextcloud-server-73bc108451169aa8ba95eba3749c6450de2ded2e.tar.gz nextcloud-server-73bc108451169aa8ba95eba3749c6450de2ded2e.zip |
Increase theming performance
1. Set proper caching headers (`Pragma: cache`)
2. Resize image proportionally to a max size of 1920px
3. Store images with progressive mode
This resizes a previous 2.8 MB picture to 300kb and makes it rendering going down from 11 seconds to less than 1 here. And future requests won't have to download the file newly.
Diffstat (limited to 'apps/theming/js')
-rw-r--r-- | apps/theming/js/settings-admin.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/theming/js/settings-admin.js b/apps/theming/js/settings-admin.js index 0de3b28bab0..c896da321c8 100644 --- a/apps/theming/js/settings-admin.js +++ b/apps/theming/js/settings-admin.js @@ -157,8 +157,8 @@ $(document).ready(function () { submit: function(e, response) { OC.msg.startSaving('#theming_settings_msg'); }, - fail: function (e, data){ - OC.msg.finishedSaving('#theming_settings_msg', response); + fail: function (e, response){ + OC.msg.finishedError('#theming_settings_msg', response._response.jqXHR.responseJSON.data.message); } }; var uploadParamsLogin = { @@ -171,8 +171,8 @@ $(document).ready(function () { submit: function(e, response) { OC.msg.startSaving('#theming_settings_msg'); }, - fail: function (e, data){ - OC.msg.finishedSaving('#theming_settings_msg', response); + fail: function (e, response){ + OC.msg.finishedError('#theming_settings_msg', response._response.jqXHR.responseJSON.data.message); } }; |