Browse Source

Hack to prevent form reposting.

Joe Clarke 1 year ago
parent
commit
e0fa5e0a23
2 changed files with 7 additions and 0 deletions
  1. 3 0
      www/index.php
  2. 4 0
      www/logicsw.php

+ 3 - 0
www/index.php

@@ -377,6 +377,9 @@ print_header(TOOL_NAME.': Physical Switches');
 	    return reztp_conf && delete_conf;
     }
 
+    if ( window.history.replaceState ) {
+        window.history.replaceState( null, null, window.location.href );
+    }
 
     $(document).ready(function() {
       $('#devtable').DataTable({

+ 4 - 0
www/logicsw.php

@@ -315,6 +315,10 @@ function refresh() {
   });
 }
 
+if ( window.history.replaceState ) {
+    window.history.replaceState( null, null, window.location.href );
+}
+
 $(document).ready(function() {
   $('#devtable').DataTable({
     "scrollY": "400px",