Adding a random number after the URL

前端 未结 5 2144
挽巷
挽巷 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:21

    Like most mentionned, you should use the jQuery cache parameter, but for your information, it is often done not using Math.random but with new Date().valueOf(), which is a time value pretty much guaranteed to be unique.

提交回复
热议问题