Comments (8)
I think it's because of Firefox, because in my opinion the page is updated using a cookie.
the errors it gives:
Synchronous XMLHttpRequests on the main thread should no longer be used because it has detrimental effects on the end user experience. For further help see https://xhr.spec.whatwg.org/#sync-warning readconfigcommon.js
The page cookie does not have a valid value for the SameSite attribute. Soon, cookies without the "SameSite" attribute or with an invalid value for it will be treated as "Lax". This means the cookie is no longer sent to contexts belonging to a third party. If your application requires the cookie in these contexts, please add the "SameSite=None" attribute to it. For more information about the SameSite attribute, see https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite.
from ai-on-the-edge-device.
Ich denke, das hat nichts mit den cookies zu tun. Das cookie haben wir ja nur, damit wir bei einem Page refresh wieder auf dem gleichen Tab landen.
Das Problem mit den Synchronous XMLHttpRequests
ist, dass sie synchron sind. D.h., wenn man einen Request sendet, bleibt das ganze WebUI blockiert, bis die Antwort oder Timeout kommt. Das ist leider nicht sehr responsive, und ist nicht mehr zeitgemäss.
Eigentlich sollten wir das UI umbauen, dass das alles asynchron passiert. Aber das ist leider einiges an Arbeit, weshalb ich das von meiner Seite auf die lange Bank geschoben habe ala, geht ja auch ohne.
Aber zu deinem Problem:
Ich meine auch, dass das mal funktioniert hat. Ich würde erwarten, dass das Web UI einen Timer hat (Javascript setInterval()
), der die relevanten Daten periodisch auffrischt. Aber ich finde nichts dazu und sehe auch nicht, dass da mal etwas entfernt wurde :(
Weist Du noch, was alles aktualisiert wurde? War es einfach alles auf der Overview-Seite?
from ai-on-the-edge-device.
Hier wird das Refresh der overview page realisiert.
https://github.com/jomjol/AI-on-the-edge-device/blob/rolling/sd-card%2Fhtml%2Foverview.html#L172
from ai-on-the-edge-device.
Diese Funktion ist ja immer noch vorhanden, nur scheint dies nicht zu funktionieren. Ich habe mal im Internet nach Refresh gesucht und auch was funktionierendes gefunden, nur kamm jedes mal beim Refresh eine Meldung seitens Firefox und deshalb habe ich alles verworfen. Denn ob ich jetzt jedes mal beim Firefox auf "zulassen" klicke oder auf den Reiter Overview um die Seite zu aktuallisieren, macht für mich kein Unterschied/Sinn.
from ai-on-the-edge-device.
Es war nur die Overview Seite die Refreshed wurde. Ich habe meine zwei Systeme auf einem Übersichtsmonitor im Büro angezeigt und das war halt praktisch mit dem AutoRefresh. Man kann das Problem in Firefox aber auch so lösen, dass man ein Addon wie TabReloader verwendet.
from ai-on-the-edge-device.
Hier wird das Refresh der overview page realisiert. https://github.com/jomjol/AI-on-the-edge-device/blob/rolling/sd-card%2Fhtml%2Foverview.html#L172
Danke!
Und soweit ich sehen kann, funktioniert es auch noch, zumindest unter Linux mit Firefox 124:
Der richtige Weg wäre, wo etwas mittels Websocket zu lösen. Ich hatte das mal in #2370 versucht, allerdings lief es nicht stabil. Vermutlich passen einige Thread sizes noch nicht (obwohl ich da recht rumgespielt habe).
Langfristig müssen wir aber auch auf asynchronous wechseln :(
from ai-on-the-edge-device.
jetz weiß ich weshalb Autorefresh nicht geht^^
in der overview, index und einigen anderen Dateien wurde aus "xhttp.open("GET", url, false);" auf "xhttp.open("GET", url, true);" gestellt, das wurde bestimmt gemacht um den Fehler "Synchronous XMLHttpRequests" zu beseitigen, nur verursacht dies halt Probleme.
from ai-on-the-edge-device.
Und soweit ich sehen kann, funktioniert es auch noch, zumindest unter Linux mit Firefox 124:
Ich habe den gleichen Refresh Algo bei mir auch im Einsatz. Mit Firefox damit aber keine Probleme. Wenn Probleme, dann müsste es im Aufruf-Kontext irgendwo haken.
Der richtige Weg wäre, wo etwas mittels Websocket zu lösen. Ich hatte das mal in #2370 versucht, allerdings lief es nicht stabil. Vermutlich passen einige Thread sizes noch nicht (obwohl ich da recht rumgespielt habe).
Langfristig müssen wir aber auch auf asynchronous wechseln :(
Meiner Meinung nach muss es nicht zwingend Websocket sein, sondern nur eine effizientere Polling Strategie (mit so wenig Requests wie möglich, da der Webserver immer nur einen Request verarbeiten kann) und asynchronem Update des Contents anstatt die gesamte Seite zu refreshen. Hiermit lässt sich eine sehr niedrige Update Rate und annehmbare Responiveness realisieren.
So habe ich das in meinem Fork realisiert: Demo Sequenz einer Runde
Wenn Umstellung auf async requests, dann sollte auch gleich auf Fetch API umgestellt werden (zukunftfähiger). Das habe ich mir auch noch vorgenommen, bin aber noch nicht dazu gekommen. Async bringt schon etwas Responsiveness, auf jeden Fall gefühlt, da die Seite nicht mehr blockiert wird.
from ai-on-the-edge-device.
Related Issues (20)
- 'TakeImage' in the field 'ImageSize' is invalid. HOT 2
- Digits interpolating direction HOT 1
- TLS not working - supported? HOT 1
- Wasserzähler Digit ROI springt spät um HOT 1
- New Reference picture result in a black screen - No flashlight HOT 5
- Wifi Connection reduced with 15.7.0 HOT 13
- Status "Initializing (delayed)" HOT 10
- Option for simple GPIO12 On/Off LED HOT 3
- No Value and Raw value are not correct HOT 4
- Zoomfaktor ändert sich zufällig HOT 1
- Unexpected "rouding" of recognized digit HOT 1
- Web Interface not reachable HOT 6
- [Feature Request] Compatible with other device HOT 1
- Exchanging Meter: Add value to measured value HOT 2
- Datafile CSV import error when neg. rate detected because extra coma HOT 5
- Logs/Data running, Value recording "stop" in between"? HOT 1
- Sending multiple results to influxdb v2
- Raw and read values are significantly differs
- Device not reachable when on VLan
- Cyclic Restart configurable HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ai-on-the-edge-device.