Adding a random number after the URL

前端 未结 5 2074
挽巷
挽巷 2021-01-07 02:43

I\'ve got a site which uses jQuery and Ajax to change the site content without reloading the page. The site contains content which I often change. But somehow the page gets

5条回答
  •  伪装坚强ぢ
    2021-01-07 03:42

    Best option is to use timestamp with the request:

    window.location.hash = $(this).attr('href')
                                .substr(0,$(this).attr('href').length-5)
                                + timestamp;
    

提交回复
热议问题