J4 Issue ? ?
avatar dgt41
dgt41
24 Jun 2017

Steps to reproduce the issue

Login to administrator area, check in your browser the XHRs and observe that 2 call have been recorded. Refresh the page and recheck the XHRs, again 2 calls. Repeat, check again

So the scripts for both the joomla update and the extensions update checkers are totally dumb and execute always no matter what. We can do better than that.

Let's use sessionStorage! Check once if no updates store a value and compare against that. If error or updates found skip the sessionStorage.

The only drawback (not really a drawback) is that the user might need to logout and log in again in order to force a new check. Which IMHO is totally acceptable!

Any thoughts or objections here, before I do any coding?

avatar dgt41 dgt41 - open - 24 Jun 2017
avatar joomla-cms-bot joomla-cms-bot - change - 24 Jun 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 24 Jun 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 24 Jun 2017
Category Feature Request JavaScript
avatar C-Lodder
C-Lodder - comment - 24 Jun 2017

Personally I don't mind having 2 Ajax requests firing every time I visit the dashboard. It's only a single page and I doubt people will continuously refresh this page.

I wouldn't want to re-login to check for updates.

avatar mbabker
mbabker - comment - 24 Jun 2017

It's what those AJAX tasks are doing under the hood that should be evaluated and improved, not the fact that the requests are happening. Right now in the 3.x code I will log in to a site, see available extension updates, update said extensions, and go back to the control panel and still be told there are updates.

avatar franz-wohlkoenig franz-wohlkoenig - change - 24 Jun 2017
Status New Discussion
avatar andrepereiradasilva
andrepereiradasilva - comment - 25 Jun 2017

why not just cache those requests for the needed time (update cache interval) using HTTP cache headers.

avatar mbabker
mbabker - comment - 25 Jun 2017

If you update core or extensions, you expect the notifications to go away as well. If it's all cached in the browser, it won't have awareness of if the user reacted to those notifications because the client won't know it needs to check again. So I don't think it can just cache the data based either on HTTP cache or the client's sessionStorage.

avatar andrepereiradasilva
andrepereiradasilva - comment - 25 Jun 2017

right, true

avatar Fedik
Fedik - comment - 25 Jun 2017

also can just use "session" cookies ? in JS side,
upd. sessionStorage also fine

avatar brianteeman brianteeman - change - 25 Mar 2018
Labels Added: J4 Issue
avatar brianteeman brianteeman - labeled - 25 Mar 2018
avatar joomla-cms-bot joomla-cms-bot - change - 25 Mar 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 25 Mar 2018
avatar mbabker
mbabker - comment - 24 Jul 2018

Is there anything actionable here? As I already stated, I don't think caching these AJAX calls is going to do anything beneficial here, and the intent of this item was to cache data to reduce the number of AJAX requests...

avatar brianteeman
brianteeman - comment - 24 Jul 2018

I am going to close it. It's been a year with no progress

avatar brianteeman brianteeman - change - 24 Jul 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-07-24 16:22:53
Closed_By brianteeman
avatar brianteeman brianteeman - close - 24 Jul 2018

Add a Comment

Login with GitHub to post a comment