do browsers remove # in URL automatically?

前端 未结 5 2102
悲哀的现实
悲哀的现实 2021-01-06 19:22

our front end guy needs to form a url containing the hash, (i.e, http://blah/#some-link.) when we hit this on the browser and inspect the http traffic using fiddler, we saw

5条回答
  •  滥情空心
    2021-01-06 19:41

    Content after the # is only used on the client side, per HTTP specification. If you require that information on the server, you can either use a different separator, or you can submit it via ajax after the page has loaded by reading it on the client with javascript.

提交回复
热议问题