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

Change cacheBust to boolean with default value true, and passthrough query parameter from phetmarks #541

Closed
samreid opened this issue Jan 11, 2017 · 10 comments

Comments

@samreid
Copy link
Member

samreid commented Jan 11, 2017

cacheBuster saved us many times in the past while we were getting used to JS caching, but now it is somewhat of a hindrance because it is impossible to set breakpoints in the dev tools and have them persist across reloads. We can use a query parameter cacheBuster=false, but I'm wondering if this would be a good time to set cacheBuster=false by default. I'm wondering what will happen on iPad--perhaps cache buster is essential there.

@samreid samreid self-assigned this Oct 4, 2019
@samreid
Copy link
Member Author

samreid commented Oct 4, 2019

I'm commandeering this issue based on today's dev meeting discussion.

@jessegreenberg said:

I have been tricked by browser caching a lot lately, especially on iOS Safari and Firefox. Would it be possible to enable ?cacheBust by default in RequireJS? Or possibly by default from phetmarks?

@jonathanolson replied:

This has been a pain point for me. I would at least prefer making it a default in phetmarks, as it is incredibly rare for me to want the caching.

I replied

It’s been very productive for me to have persistent breakpoints across reloads. I have to remember to run with dev tools open so I don’t get stale cache, but it has been worth the trouble for me. But maybe we need to make it so different developers can have different defaults? Perhaps a pass-through query parameter for phetmarks? Like if you bookmark http://localhost/phetmarks/?cacheBust then that query parameter passes through to launched sims?

@pixelzoom said:

+1 for pass-through query parameters, +1 cacheBust=true default

@jbphet said:

+1 for pass-through query parameters, +1 cacheBust=true default

@Denz1994 said:

+1 for cacheBust = true default

Consensus:

SR: I’ll make it boolean, default to true. There is a usage in phettest to change. I’ll pass through query parameters in phetmarks. Hopefully next week!
MK: Update logic in the dev HTMLs
CM: Update the config.js files, probably just doc?

@samreid samreid changed the title Can we set cacheBuster to false now? Change cacheBust to boolean with default value true, and passthrough query parameter from phetmarks Oct 4, 2019
samreid added a commit that referenced this issue Oct 4, 2019
@samreid
Copy link
Member Author

samreid commented Oct 4, 2019

The core changes are committed above, those commits will be most pertinent for review. Following are the commits for grunt update.

@samreid
Copy link
Member Author

samreid commented Oct 4, 2019

Note to self to consider #759 and phettest moving forward. Commits to many repos follow.

samreid added a commit to phetsims/circuit-construction-kit-black-box-study that referenced this issue Oct 4, 2019
samreid added a commit to phetsims/circuit-construction-kit-dc-virtual-lab that referenced this issue Oct 4, 2019
samreid added a commit to phetsims/circuit-construction-kit-ac that referenced this issue Oct 4, 2019
samreid added a commit to phetsims/reactants-products-and-leftovers that referenced this issue Oct 4, 2019
samreid added a commit to phetsims/equality-explorer-two-variables that referenced this issue Oct 4, 2019
samreid added a commit to phetsims/balloons-and-static-electricity that referenced this issue Oct 4, 2019
samreid added a commit to phetsims/balancing-chemical-equations that referenced this issue Oct 4, 2019
samreid added a commit to phetsims/models-of-the-hydrogen-atom that referenced this issue Oct 4, 2019
samreid added a commit to phetsims/circuit-construction-kit-dc that referenced this issue Oct 4, 2019
samreid added a commit to phetsims/gene-expression-essentials that referenced this issue Oct 4, 2019
samreid added a commit to phetsims/masses-and-springs-basics that referenced this issue Oct 4, 2019
samreid added a commit to phetsims/area-model-multiplication that referenced this issue Oct 4, 2019
samreid added a commit to phetsims/least-squares-regression that referenced this issue Oct 4, 2019
samreid added a commit to phetsims/isotopes-and-atomic-mass that referenced this issue Oct 4, 2019
samreid added a commit to phetsims/gravity-force-lab-basics that referenced this issue Oct 4, 2019
samreid added a commit to phetsims/graphing-slope-intercept that referenced this issue Oct 4, 2019
samreid added a commit to phetsims/forces-and-motion-basics that referenced this issue Oct 4, 2019
samreid added a commit to phetsims/equality-explorer-basics that referenced this issue Oct 4, 2019
samreid added a commit to phetsims/energy-skate-park-basics that referenced this issue Oct 4, 2019
samreid added a commit to phetsims/energy-forms-and-changes that referenced this issue Oct 4, 2019
samreid added a commit to phetsims/function-builder-basics that referenced this issue Oct 4, 2019
samreid added a commit to phetsims/fluid-pressure-and-flow that referenced this issue Oct 4, 2019
samreid added a commit to phetsims/buoyancy that referenced this issue Oct 4, 2019
samreid added a commit to phetsims/griddle that referenced this issue Oct 4, 2019
samreid added a commit to phetsims/density that referenced this issue Oct 4, 2019
samreid added a commit that referenced this issue Oct 4, 2019
samreid added a commit to phetsims/neuron that referenced this issue Oct 4, 2019
samreid added a commit to phetsims/wilder that referenced this issue Oct 4, 2019
samreid added a commit to phetsims/chains that referenced this issue Oct 4, 2019
samreid added a commit to phetsims/bumper that referenced this issue Oct 4, 2019
samreid added a commit to phetsims/tambo that referenced this issue Oct 4, 2019
samreid added a commit to phetsims/joist that referenced this issue Oct 4, 2019
samreid added a commit to phetsims/blast that referenced this issue Oct 4, 2019
samreid added a commit to phetsims/twixt that referenced this issue Oct 4, 2019
samreid added a commit to phetsims/vegas that referenced this issue Oct 4, 2019
samreid added a commit to phetsims/vibe that referenced this issue Oct 4, 2019
samreid added a commit to phetsims/sun that referenced this issue Oct 4, 2019
samreid added a commit to phetsims/phetmarks that referenced this issue Oct 4, 2019
@samreid
Copy link
Member Author

samreid commented Oct 10, 2019

Marking for dev meeting public service announcement to indicate that cache busting is now back on by default, specified by a boolean query parameter. Pass-through query parameters for phetmarks not yet implemented, should be done in a separate issue, perhaps at different priority. Anybody else want to work on that part?

@jessegreenberg
Copy link
Contributor

jessegreenberg commented Oct 10, 2019

Thanks for working on this @samreid, I can work on the phetmarks part. Is it still beneficial to "pass through" to phetmarks or can we add an entry in the phetmarks query param list?

@samreid
Copy link
Member Author

samreid commented Oct 10, 2019

I'm not sure I would use that "pass through" too much, let's see if it is important for others.

@pixelzoom
Copy link
Contributor

pixelzoom commented Oct 21, 2019

@samreid The way that this is presented in phetmarks is confusing, it's a checkbox whose value is !cachBust.

screenshot_1635

Can we please change to something like this?

  • Cache Bust (cacheBust=true|false)

Another reason for changing is that the passthrough ?cacheBust value would also need to be inverted to set the current checkbox value.

@jessegreenberg
Copy link
Contributor

Agreed its a little confusing. But when a checkbox above is unchecked it doesn't set a value to false it just allows default value for query param. Since default for cacheBust is true in initialize-globals we need the checkbox to disable.

@jessegreenberg
Copy link
Contributor

So for meeting 11/14/19 there are two remaining questions.

Does anyone want the ability to pass a query parameter to phetmarks to populate values of the sim "Query Parameters" checkboxes?
Can we live with a "Disable Cache Bust" checkbox or should we work on changing this to a "Cache Bust" checkbox?

@samreid
Copy link
Member Author

samreid commented Nov 14, 2019

At dev meeting:

@zepumph recommends a new issue in phetmarks to properly support boolean query parameters in phetmarks, rather than just being able to append a string or not.

@pixelzoom also volunteered to clean up the checkbox label itself.

We also agreed not to implement the passthrough.

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

3 participants