Basic Ajax Cache Issue

前端 未结 3 1036
感情败类
感情败类 2020-12-07 06:48

I have a single page that I need to on occasion asynchronously check the server to see if the status of the page is current (basically, Live or Offline). You will see I have

3条回答
  •  独厮守ぢ
    2020-12-07 07:20

    You can check if it's a caching issue by adding unique ID to the url:

    change url: '/live/live.php', to url: '/live/live.php?'+new Date().getTime(),

    Cheers

    G.

提交回复
热议问题