duankanyi6539 2017-06-07 10:25
浏览 38
已采纳

页面重新加载后的相同Ajax响应

I am building a website where I am loading the content through an Ajax request. So when the user clicks on a link I prevent a page reload and load the content with Ajax in the main area. Now I have the problem that if the user clicks on the refresh button they will be thrown away to the very first page. Is there a way to somehow store where the user is in the page in the moment and to recall that value at a reload so that I can call the same Ajax Request the user had last?

Let me know if you need any specific code.

Thanks a lot!

David

  • 写回答

2条回答 默认 最新

  • dongqu2863 2017-06-07 10:30
    关注

    It's common for Single Page Applications to use hash parameters in the URL to keep a track of the page state.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥100 微信小程序跑脚本授权的问题
  • ¥100 房产抖音小程序苹果搜不到安卓可以付费悬赏
  • ¥15 STM32串口接收问题
  • ¥15 腾讯IOA系统怎么在文件夹里修改办公网络的连接
  • ¥15 filenotfounderror:文件是存在的,权限也给了,但还一直报错
  • ¥15 MATLAB和mosek的求解问题
  • ¥20 修改中兴光猫sn的时候提示失败
  • ¥15 java大作业爬取网页
  • ¥15 怎么获取欧易的btc永续合约和交割合约的5m级的历史数据用来回测套利策略?
  • ¥15 有没有办法利用libusb读取usb设备数据