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

Investigate cache busting with es6 modules #866

Closed
jonathanolson opened this issue Feb 6, 2020 · 4 comments
Closed

Investigate cache busting with es6 modules #866

jonathanolson opened this issue Feb 6, 2020 · 4 comments

Comments

@jonathanolson
Copy link
Contributor

Likely will deal with web server settings (I'm familiar enough to handle Apache, but not sure what other servers our devs are using).

(??, 2 hours) [sprintable, post-publication] Cache busting will likely not work the same for ES6 module import as it did for requirejs
JO: We can address this with web server settings potentially
SR: See https://stackoverflow.com/questions/47675549/how-do-i-cache-bust-imported-modules-in-es6
JO: We would need to find out what server each team member is using.
JO: We should check phettest.colorado.edu (iPads will need to revalidate)
Probably JO or MP would be needed for this
JO: Ideally the server would send headers that ALLOWS caching, but forces revalidation on every access (so that the files are not re-sent if they haven’t changed, but will be reloaded on any change)
JO: We’d presumably want to get rid of cacheBust/getCacheBustArgs

@jbphet
Copy link
Contributor

jbphet commented Jun 4, 2020

Discussed in the 6/4/2020 dev meeting, and @zepumph mentioned that he set up his local server to not do caching, and did something on phettest as well. Assigning to him to record this information so that we can have it available.

Also @zepumph - please make a note in the development overview document on how to disable caching in Chrome when dev tools are open.

Once this information is collected, this issue can be closed.

zepumph added a commit to phetsims/phet-info that referenced this issue Jun 12, 2020
zepumph added a commit to phetsims/phet-info that referenced this issue Jun 12, 2020
@zepumph
Copy link
Member

zepumph commented Jun 12, 2020

Above I updated doc to add the http-server flag to disable cache, and a note about chrome dev tools.

I also did a bit more digging about the changes I did on phettest for caching.

I added this to the .httaccess where the phet repos live:

<filesMatch ".(js)$">
    Header set Cache-Control "no-store"
</filesMatch>

After doing that, I saw in the network tab of the chrome dev tools that no-store was successfully added as a header. Unfortunately, I could not get the cache to work with the header gone. Thus I can't say that it is doing anything in the current state (since it doesn't cache without that header). Still I think that it would be good to keep in there in case the apache server starts caching. It feels a bit more future proof to me.

@samreid, I remember that this didn't work when we did it with your server, do you have any recollection about that? Do you think I should just remove this header from phettest?

@samreid
Copy link
Member

samreid commented Jun 18, 2020

I thought we had tried a rule in apache httpd.conf on my side and saw it still caching. From my research, it seems like using .htaccess is the standard way to address this. This is not my area of expertise and may be best to consult with @jonathanolson. Let's touch base at today's meeting and decide how to proceed.

@chrisklus
Copy link
Contributor

from 06/18/20 dev meeting:

We haven't heard of any caching problems on phet-test in a while. Assigning to @KatieWoe to check in and see if you've had any caching issues. If not, @ariel-phet says let's go ahead and close.

samreid pushed a commit to phetsims/phet-info that referenced this issue Apr 23, 2022
samreid pushed a commit to phetsims/phet-info that referenced this issue Apr 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants