Closed ttjaden closed 3 years ago
Fetching from the cache is the issue here. This must be an ajax communication with the backend. I guess, with a forced reload, the votes are correct.
I have to check, how takint the values from the cache can be avoided.
Fetching from the cache is the issue here. This must be an ajax communication with the backend. I guess, with a forced reload, the votes are correct.
Yes, that's right
I have to check, how takint the values from the cache can be avoided.
This would be great! A few months ago, there were no problems with firefox. I also don't know, why the problem now appears (and why only in firefox)
I have no idea, because I dont't have this issue. I am using firefox, too. Maybe a setting or an add-on is the reason?
I think, something like a no-cache header must be sent. But I still have to investigate.
Can you provide the header parameters from the network tab?
In don't know if this is what you need
with first row details
request header when voting
answer header
And as you suggested: A force reload results in a correct view
Excatly that. The response header sends cache-control: max-age=60
which tells the browser, to take every request from cache within the next 60 seconds. For the XHR-Request, this no good idea. I guess, this is a webserver setting.
It should be at least cache-control: no-cache
. On my system it is cache-control: no-cache, no-store, must-revalidate
I have to check, if I can override this.
Just a note to myself:
I tried to change the response headers, but this has no effect.
The default headers are cache-control: no-cache, no-store, must-revalidate
judging from OCP\AppFramework\Http\Response
$response = new DataResponse($callback(), Http::STATUS_OK, [ "Cache-Control" => "no-cache" ]);
DataResponse::cacheFor(60)
Checking the response with Response::checkHeaders shows the headers, as expected
"Cache-Control":"no-cache"
and "Cache-Control":"private, max-age=60, must-revalidate"
)cache-control: no-cache, no-store, must-revalidate
@dartcafe Can I support somehow witjh another test or something else?
You could check your nginx configuration, because, the cache-control from the app (better NC core) is defined to not cache the pages. So i guess that a server configuration overrides the header.
Nevertheless, I think about adding a random parameter to the requests, which should avoid caching the API-Calls.
Thanks for your efforts! If you have another 2min, could you have a look in this configuration? https://www.c-rieger.de/nextcloud-installationsanleitung/
This is the configuration i used (ngnix, php) for my nextcloud instance. You will find the "no-cache" option. Is this wrong or right?
I don't think so, but I am not an administrator and have limited experience in configuring a web server. If you are able to install the beta3 (will come this night) you could test the access with the changed request parmeters, which - I hope - will eliminate the caching of the API calls.
@ttjaden Any news? With the update to 2.0.2 the caching should be bypassed. Can you confirm?
@dartcafe Yes, now all is working as expected! Thanks a lot!
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
What is going wrong?
Describe the bug When selecting an option with firefox browser, the checked box is unchecked again a second later
To Reproduce Steps to reproduce the behavior:
https://user-images.githubusercontent.com/16917049/118722243-3ad45d80-b82c-11eb-8a33-219c3312bf53.mp4
Expected behavior Option stay checked
Screenshots See above
Information about your polls installation
1.8.3
Fresh installation or update from a prior version (from which one)? Fresh installation
How did you install this version?(Appstore or describe installation) Appstore
Information about your Instance of Nextcloud
Nextcloud version: (see Nextcloud admin page) 21.0.1
List of activated apps:
Nextcloud configuration:
Server configuration
Database: MariaDB 10.5
PHP version: 8.0
Are you using an external user-backend, if yes which one: no
Client configuration
Device: Desktop
Browser: Firefox
Logs
Browser log
a) The javascript console log
b) The network log