How to prevent google chrome from caching my inputs, esp hidden ones when user click back?

我与影子孤独终老i 提交于 2019-12-01 17:18:41

Moved here after reading @pruts comment ;)

my boss found the answer, it was a simple autocomplete="off" added to the input attributes, although vwd will flag it as an error :)

I guess you can reset the hidden fields as soon the page is loaded.

<script type="text/javascript">
  $(function() {
      $("input[type=hidden]").val("");
  });
</script>

This code is executed when you hit "back".

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!