Comments (20)
Got the solution, but it is not satisfying. If I delete all data for the website of the visualisation in preferences-> Privacy & Security -> Manage Data, the visu works again in the newest version.
There should be an easy and more intuitive way to achieve this (like F5 or ctrl+F5). If it is not possible, there should at least be a hint in the readme file. It took me hours to solve this issue.
from webvisu.
is it ok to for a full reload only when closing and opening the tab again ?
or do you prefers to reload everything on a normal reload ?
from webvisu.
Could you test with this version:
https://github.com/Ekristoffe/WebVisu/tree/Dev/dist
It should reload from scratch the whole visu on a browser reopen or tab reopen.
from webvisu.
Closing the tab and opening a new one works. Even just opening a new one without closing the old one works.
Answering your question above. I would prefer CTRL+F5 to reload the visu, I think it is most intuitive, as normally CTRL+F5 reloads and clears the cache. Most computer affine people know that, and do it if something wired happens during a normal reload. But I don't know javascript and have no idea, whether it is possible to achieve with moderate effort.
Reopening the tab is ok for me, but you should make a notice about it in the readme file.
from webvisu.
The loaded visu files are stored in the local storage intentionally. This was implemented to reduce the load time for big sized visualisations, like Wago own facility solutions. They are quit heavy, so the storaging should be kept in my opinion. It improves the user experience.
Actually the process should be:
Has the XML changed?
No -> Load from storage
Yes -> Reload
I thought the <download-id></download-id> tag in the visu_ini.xml changes with an application change. But this is apparently not the case. Maybe the <time-stamp></time-stamp> tag in the xml file would be accurate?
from webvisu.
I see the advantage of storing the visu locally. But there should definitely be an easy, intuitive way to reload the visu like CTRL+F5, as long, as the automatic reload doesn't work reliable. If it works, it would be of course the best solution.
In my visu there is no <download-id>
tag at all. Maybe this is the problem. The <time-stamp>
tag may be more suitable. In my visu the actual tag is <time-stamp>1610038976,1586465552</time-stamp>
which doesn't seam to be a typical unix like time-stamp, but if it changes with each new version, that doesn't matter. In a first test, the part left from the comma changed after a new upload of the visu, in the right part there was no change <time-stamp>16100
53743
,1586465552</time-stamp>
from webvisu.
Okay, thanks for your help. We have to include the functionality of a CTRL+F5 hard reload.
from webvisu.
I see the advantage of storing the visu locally. But there should definitely be an easy, intuitive way to reload the visu like CTRL+F5, as long, as the automatic reload doesn't work reliable. If it works, it would be of course the best solution.
In my visu there is no<download-id>
tag at all. Maybe this is the problem. The<time-stamp>
tag may be more suitable. In my visu the actual tag is<time-stamp>1610038976,1586465552</time-stamp>
which doesn't seam to be a typical unix like time-stamp, but if it changes with each new version, that doesn't matter. In a first test, the part left from the comma changed after a new upload of the visu, in the right part there was no change<time-stamp>16100
53743
,1586465552</time-stamp>
The <download-id>
tag is in the visu_ini.xml file.
The <time-stamp>
tag is in each visu pages and can only be accessed by reloading the page again.
I will see what can be done.
Edit: I may have found a way to keep the local storage and having the update file without reloading everything.
I need more time to test it.
from webvisu.
I made a new system which check the file "last modified" parameter to determined if we need to download it again or not.
Could you check it and tell me if it work fine with your application ?
Thanks you.
from webvisu.
The visu_ini.xml file isn't updated every time, I change the visu. Till now, I wasn't able to find out, what kind of changes in the program or visu result in a change of the visu_ini.xml (and so maybe a change of the <download-id>
). Where is the last modified parameter? I can't find it in visu_ini.xml and in plc_visu.xml.
from webvisu.
Indeed there is no information.
That’s why now I am using the last modified parameter (you can find it for example in windows when you right click a file ans select property)
On a internet file it is in the header of the file when you download it.
I just request the header without the file every time I need to load a file.
from webvisu.
I have tested it. The problem should be solved. Every change will be trigger a reload of the visu.
from webvisu.
Yes after a page refresh just the changed page is redownload and updated.
from webvisu.
great, sounds good. I'm out of office for one week now and can't test this (and the other issues) till I'm back end of next week.
Nevertheless, thanks for your work, it is really amazing, how fast the two of you are responding to my questions and solving my issues.
from webvisu.
yes, works for me too. Just a F5
in the browser and the page gets reloaded. Maybe Ctrl+F5
would be better, so that the long loading time for complex visus can be avoided for a normal reload (like mentioned earlier from tnentwig), but I have no idea, whether it is possible with javascript.
from webvisu.
unfortunately it doesn't also the page reloading is automatic even on page change (no need to reload normally).
I have selected this just in case there is a pointer change in the webvisu,
If we don't reload and the pointer has change the webvisu could write on another variable which is unwanted.
from webvisu.
I made a reworking with sessionstorage who is cleared on page reload. This will be the best option in my opinion, a revisit of a site inside a session is faster then.
Your idea with last-modified is not working on currently available controller like 750-884. They return always the actual timestamp.
@Ekristoffe Do you made the same experience with the 880?
from webvisu.
For me it is a good solution now. It works like a normal user would expect it. Thanks for your solution.
from webvisu.
Does not update the visu on a 750-841 controler. I changed the plx_visu.xml file manually (changed the text tag of a rectangle), made a reload, and it doesn't show the new text. Even after closing an reopening the tab it doesn't show the change.
Reason for this change was an error in the format string. I forgot to double the %. So it was not shown in the javascript visu (which I think is a correct behaviour), but it is shown in the java version (which is incorrect in my opinion, and the reason, why I didn't realize this error earlier).
from webvisu.
Hopefully should be fixed now in the latest release. We will use only the sessionStorage now. A F5 will clear all prefetched visus.
from webvisu.
Related Issues (19)
- sector (german Kreissektor) seems not to work HOT 5
- mouse click on an object doesn't set the input variable of that object HOT 9
- grouped objects have wrong coordinates HOT 4
- background colour HOT 11
- variables are not working (NaN) when webvisu.js ist stored on sd-card HOT 12
- mouse pointer doesn't change when hovering over a clickable item HOT 4
- polyline with "no frame colour" is not visible even if alarm-colour is activated HOT 9
- Web browser compatibility HOT 3
- conversion factor for variables doesn't work HOT 3
- interface refractoring
- hidden variable not evaluated in slider
- relative position in rectangle doesn't work
- Action Prettier fail
- Dynamic Texts not working HOT 1
- WEBvisu for Codesys 3 HOT 1
- Dynamic Text support HOT 6
- Browser cache HOT 2
- Polylines draw triangles in the angles HOT 4
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 webvisu.