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

Some caching issue with new lfortran.wasm #62

Open
certik opened this issue Feb 16, 2023 · 5 comments
Open

Some caching issue with new lfortran.wasm #62

certik opened this issue Feb 16, 2023 · 5 comments

Comments

@certik
Copy link
Contributor

certik commented Feb 16, 2023

I merged #61, which added a test template_array_03 which required to upgrade LFortran from version 46bc01c11 to version df33df422. Locally it works and compiles the example:

Screen Shot 2023-02-15 at 9 33 23 PM

but the deployed version online does not compile the example for me:

Screen Shot 2023-02-15 at 9 33 36 PM

I am not sure if lfortran.wasm somehow didn't get updated (even though the hash is correct in both screenshots), or if the browser caches the old version more aggressively than it should. A simple refresh does not fix the problem.

We should figure out what the problem could be.

@Shaikh-Ubaid
Copy link
Member

A simple refresh does not fix the problem.

We can try "hard refresh" using ctrl/cmd + shift + r. It usually fixes similar problems for me.

@certik
Copy link
Contributor Author

certik commented Feb 16, 2023

I checked that the sha sum of both the deployed lfortran.wasm and my local one is the same:

shasum lfortran.wasm
8da2bd1642081fab941d546958bceaf9a28ddde4  lfortran.wasm

@certik
Copy link
Contributor Author

certik commented Feb 16, 2023

Ok, cmd+shift+r did fix the problem for me!

Why is my browser caching the old version? Is there some setting that we can set in the app to force the browser to refresh?

@Shaikh-Ubaid
Copy link
Member

Why is my browser caching the old version?

I think the caching feature is being provided by the emscripten generated lfortran.js file. There could be some flag related to caching in emscripten, I am currently unsure about it. It seems the current working of caching is, in a way, desirable. The page loads instantaneously on a normal refresh (without reloading the lfortran.wasm) and the page loads fully (reloading the lfortran.wasm) with a hard refresh.

Is there some setting that we can set in the app to force the browser to refresh?

Sir, do you mean to add some button that (hard) refreshes the page?

@certik
Copy link
Contributor Author

certik commented Feb 16, 2023

We can document how to do hard refresh on every browser, that might be enough. I am worried that we update LFortran, like we did above, and it will not update for users, so it will break some examples.

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