크롬에서 Submit() 되어 Form 방식으로
넘어온 데이터가 페이지를 Reload() 하게 되면 사라지는 크롬만의 버그!!!.
몇년된 버그라고 하는데 그닥 고쳐지지 않고 있습니다.
임시방편은 GET 방식으로 값을 받거나
Reload 대신 다시 폼을 구성하여 다시 Submit() 하는 방법정도...
Test Url : http://www.uhoon.co.kr/test/2514.asp
: Submit() 후 Reload 하면 값이 사라집니다.
<!DOCTYPE html> <html> <head> <title>Chrome Bug - Reload()</title> <script src="http://code.jquery.com/jquery-latest.min.js"></script> <meta http-equiv="content-type" content="text/html;charset=UTF-8"> <script type="text/javascript"> <!-- $(function() { $("#btnReload").on("click",function(){ location.reload(); }); }); //--> </script> </head> <body > <div> <form method="post" action="2514.asp" name="frmTest"> <label for="Data">Send Data:</label> <br/> <input type="text" name="A" value="AAA"/> <input type="text" name="B" value="BBB"/> <input type="text" name="C" value="CCC"/> <br/> <br/> <label for="Data">Request Data:</label> <br/> <textarea id="formData" rows="5" cols="50"><%=Request.Form%></textarea> <input type="submit" /> <input type="button" value="reload" id="btnReload"/> </form> </div> </body> </html>
참고 Url :
https://code.google.com/p/chromium/issues/detail?id=6429
https://bugs.webkit.org/show_bug.cgi?id=23735
http://stackoverflow.com/questions/13476006/javascript-location-reload-is-losing-post-data
크롬은 참으로 우수한 녀석인데...어찌 이런 버그가 있는지..
통탄할 따름입니다...--;