Is there some way to prevent the browser’s caching of checkbox selections post refresh?
Use-case:
- User selects some checkboxes on a page. At the same time some internal server state changes.
- User refreshes the page. The server renders the page with different checkboxes selected than before, but the users browser in most cases shows the old set of selections
In these cases i usually need to run some js to set the right selection, but is there a better way?
add
autocomplete='off'to the checkbox’s parent form tag