Skip to content
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

Tornado server loads cached javascript #5

Open
aiwhoo opened this issue Mar 14, 2022 · 2 comments
Open

Tornado server loads cached javascript #5

aiwhoo opened this issue Mar 14, 2022 · 2 comments

Comments

@aiwhoo
Copy link

aiwhoo commented Mar 14, 2022

Describe the bug
Tornado server loads cached javascript. Any changes to simple_continous_module.js require manual cache removal or to go incognito.

Expected behavior
javascript code should be loaded fresh on each run

To Reproduce
hardcode the color red, run the program and view on browser, then hard code color blue in:
https://github.com/projectmesa/mesa/blob/main/examples/boid_flockers/boid_flockers/simple_continuous_canvas.js

Additional context
Using Chrome on Mac OS.

This may be useful https://stackoverflow.com/questions/12031007/disable-static-file-caching-in-tornado and somewhere around here should be modified
https://github.com/projectmesa/mesa/blob/main/mesa/visualization/ModularVisualization.py#L243

@rht
Copy link
Contributor

rht commented Mar 14, 2022

This seems to be a more recent solution: https://stackoverflow.com/questions/37905690/tornado-setting-headers-for-caching.
@aiwhoo if you are up for it, a pull request would be great.

@aiwhoo
Copy link
Author

aiwhoo commented Mar 14, 2022

Unfortunately, my tornado is limited, but I'll see how far we get in the next week. 🥲

@rht rht transferred this issue from projectmesa/mesa Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants