image files stored in a repl seem to be reloaded every time a html-js-css repl is run
image files are cached for faster reload
image file loaded from server when I press the ‘run’ button
Steps to reproduce:
- create an html-js-css repl.
- upload a heavy image file (like 1.8MB spritesheet)
- write js code to display the image
- run the repl
Bug appears at this link:
Welcome to the community!
Every time I run an HTML/JS/CSS Repl, it refreshes the cache when you hit run. Please note two important things:
- It only does this on the webview section of the code editor. Opening the website in a new tab would prevent the cache refreshing (unless you used
Ctrl F5 when refreshing).
- This is a good thing. When I’m making websites, I may make major changes to the site and I need the cache refreshed so that it reflects those changes. You can’t really force a cache refresh on the webview in the code editor, so doing this automatically is good.
Please also note that since the webview tab in the code editor is embedded in Replit’s website (rather than being freestanding), it should be slower, as it’s probably just an
In conclusion, I think that this is not a bug but actually a necessary feature without which coding would be more difficult, as you would have to either use a new tab in your browser or else refresh the code editor page to refresh the webview.