-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Serious caching error with p5 Editor #1234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already. |
Thanks for reporting! I have noticed this but I'm unsure how to fix it. Open to all ideas and suggestions! |
I have tried adding ?a=123 to the end of a URL but that only works once I've gone to the source and clicked the URLs in that (and appended a bit different)... The REAL PROBLEM is when you return to an old tab, reload, edit and save.... argh! |
If you do a hard refresh (shift + command/control + r), it should clear the cache! Not the best solution, but it's something. |
That doesn't work. Trust me. |
got it. then I guess it's caching from the CDN. i guess possible solutions are:
|
Ok So This Problem is there only till the user has not saved the sketch and has moved to a new tab one possible soultion could also be to store the current sketch that is in editing mode in localStorage(or a serviceworker) that could preserve the sketch code between tab switchs |
There are 2 problems here |
This issue is focused on the browser caching issue. I'm going to open a new issue about updating the sketch in a different tab! |
Not sure if there is a better issue to add this on to, but when I was writing a sketch using a webworker using a file worker.js, any edits to worker.js wouldn't be reflected in the cache. Edits to sketch.js were updated fine. Whenever I ran the sketch, a stale version of worker.js would be used. As a workaround I had to duplicate the sketch to get a new ID for it in order to get the latest version of my worker.js file. I wasn't loading worker.js in index.html. I tried that but it didn't help. |
@wetmore I think you're in the right place! Thanks for the additional info. |
I think the solution here is to add a header in the response from the server. Specifically, I was looking at how Glitch.com handles this. Glitch adds the header |
[#1234] Add header to clear cache for present view
It worked 😄 This will be fixed for the next release. |
Has this made it into the current editor? I'm still seeing this problem - makes it virtually impossible to use web-workers in the editor |
I can be working on a sketch, and open the Present or Full view and it doesn't reflect the changes I've made.
I clear cache and reload... same thing...
THEN I open a new Chrome window and open the sketch and it's a PREVIOUS version of the sketch... Often if I save at that point I've then lost my work to an earlier version.
This has happened more than once... don't know if it's the browser or the p5 Editor site...
The text was updated successfully, but these errors were encountered: