Closed Hermann-SW closed 9 months ago
@Hermann-SW best solution would be to setup CORS headers, so jscad.app can run them by using browser download.
Since you do not have correct CORS headers, jscad.app uses fallback proxy, that is hosted on some cloud provider. There is obviously some heavy caching in that cloud service.
@platypii could you look into it ?
@hrgdavor Thanks, I tested with this new gist and curl: https://gist.github.com/Hermann-SW/ef1ceade4aa53412585e42b6c5122354
Different to one of your previous postings on CORS https://github.com/jscad/OpenJSCAD.org/issues/1318#issuecomment-1896152731
only one "*allow*" header is returned by the raw gist (access-control-allow-origin: *).
@Hermann-SW cache is now turned off for the proxy script by @platypii . Try again, I did, and now it shows error correctl, instead of old cached file. This will also be useful if file changes from time to time, so ppl get fresh version.
only one "allow" header is returned by the raw gist (access-control-allow-origin: *).
there is a special pre-flight request that browser is not showing you. And also I copied .htaccess example from somewhere, and it worked for me. I did not try to minimize it.
@hrgdavor Thanks, same here, jscad.app now reports:
Error: failed to load script from url https://stamm-wilbrandt.de/en/forum/C36_10.correct.jscad
Just one last comment, I experimented with gist and cache control. To reference latest version, no commit hash should be in URL: https://gist.github.com/Hermann-SW/ef1ceade4aa53412585e42b6c5122354?permalink_comment_id=4841174#gistcomment-4841174
max-age=300 for raw gist cannot be lowered. So workflow to publish JSCAD gist is:
More details: https://gist.github.com/Hermann-SW/ef1ceade4aa53412585e42b6c5122354?permalink_comment_id=4841245#gistcomment-4841245
@Hermann-SW thank you for the research, and the insights, I will add those findings somewhere in readme for others to see
I worked on Raspberry Pi5 before, switched to Linux on x86_64 laptop.
This file does not exist: https://stamm-wilbrandt.de/en/forum/C36_10.correct.jscad
Proof on server:
openjscad.xyz errors out as it should: https://openjscad.xyz/?uri=https://stamm-wilbrandt.de/en/forum/C36_10.correct.jscad
jscad.app shows a model for that URL: https://jscad.app/#https://stamm-wilbrandt.de/en/forum/C36_10.correct.jscad
The model displayed is one I created, but not under that name. New OS, new browser (chrome this time), so it cannot be a problem of local browser cache.
Does jscad.app fantasize? If so, can that be turned off please?