Hash fragments with forward-slash throwing 403 errors with AJAX requests in IE

与世无争的帅哥 提交于 2019-12-19 10:04:19

问题


I have a URL similar to: http://www.example.com/#!/test/

And an AJAX request that is handled when the hash fragment is /test/. The AJAX request is fine except in IE, where it throws a 403 error. It works fine in all other browsers.

Now, if I change the URL to: http://www.example.com/#!test/

It works just fine. I can't change my current hash fragment URL structure. Any solutions/suggestions?


回答1:


Use a network debugger (e.g. www.fiddler2.com) and determine what the difference in the HTTP request is that results in the server sending back a different response. My guess is that the way that you're getting the data out of the hash results in sending a different query to the server between browsers (e.g. includes "#" or lacks "#") and that causes the server to return the 403 to IE.



来源:https://stackoverflow.com/questions/6894134/hash-fragments-with-forward-slash-throwing-403-errors-with-ajax-requests-in-ie

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