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?
Labels |
Added:
?
|
Category | ⇒ | Feature Request JavaScript |
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.
Status | New | ⇒ | Discussion |
why not just cache those requests for the needed time (update cache interval) using HTTP cache headers.
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.
right, true
also can just use "session" cookies
upd. sessionStorage also fine
Labels |
Added:
J4 Issue
|
Labels |
Added:
?
|
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...
I am going to close it. It's been a year with no progress
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-07-24 16:22:53 |
Closed_By | ⇒ | brianteeman |
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.