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

Don't let the browser show a cached transition page #254

Closed
wants to merge 1 commit into from
Closed

Conversation

@fofr
Copy link
Contributor

@fofr fofr commented Apr 14, 2014

In user research users have often been confused by the inconsistent state of mappings, hits and flash messages when using the back button. This PR is to address ticket #68870422.

This may be a contentious change, which is one of the reasons I've opened the PR for some discussion about the problem.

  • Avoid showing a user an inaccurate mappings list when a user hits back
  • Avoid showing flash messages multiple times when a user hits back
  • Avoid showing incorrect summary tables on hits pages after editing mappings
Paul Hayes
* Avoid showing a user an inaccurate mappings list when a user hits back
* Avoid showing flash messages multiple times when a user hits back
@jamiecobbett
Copy link
Contributor

@jamiecobbett jamiecobbett commented Apr 16, 2014

@jennyd do you have any thoughts? I'm inclined to merge. @fofr says that the main consequence is that pages aren't shown from the browser's cache when going forwards and backwards in the history. Apparently Safari doesn't use the cache anyway.

@@ -23,6 +24,13 @@ def render_error(status, options={})
render "errors/error_#{status}", status: status, layout: 'error_page'
end

# http://stackoverflow.com/questions/711418/how-to-prevent-browser-page-caching-in-rails
def set_cache_buster

This comment has been minimized.

@jennyd

jennyd Apr 16, 2014
Contributor

Should this be a private method?

This comment has been minimized.

@jamiecobbett

jamiecobbett Apr 16, 2014
Contributor

I think so, though so should the other methods here...

@jennyd
Copy link
Contributor

@jennyd jennyd commented Apr 16, 2014

Sounds reasonable to me. Various applications have config in Puppet to set Cache-Control - I don't know if we should be setting it there instead of here for some reason.

@fofr
Copy link
Contributor Author

@fofr fofr commented Apr 16, 2014

I found a new problem this introduces. When bulk adding, after submitting the form containing all the paths, if you hit back the page isn't cached so you don't see the form with your fields filled in. Hmm.

@fofr
Copy link
Contributor Author

@fofr fofr commented Apr 25, 2014

Closing until form fields bug mentioned above is fixed.

@fofr fofr closed this Apr 25, 2014
@jennyd jennyd deleted the no-cache branch Nov 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.