PHP Redirect that force refresh (CTRL+F5)

前端 未结 3 439
没有蜡笔的小新
没有蜡笔的小新 2021-01-20 15:50

I have a page with an editable table. I need users to be able to edit this and then submit their changes. Everything works well until I redirect them to the same page with n

相关标签:
3条回答
  • 2021-01-20 16:19

    You must set the cache control and expiration on the page which you wish to force-refresh on. By setting that before the redirect, you're telling the browser to not cache the page you're redirecting from.

    0 讨论(0)
  • 2021-01-20 16:22

    Use this header to use refresh:

    Refresh: 0;url=http://www.bamozir.com/en/mtl-en/recent/general-info/cost#edit
    

    See more on that topic here: 'Refresh' HTTP header

    0 讨论(0)
  • 2021-01-20 16:35

    What ALLWAYS works: Assuming your URL is http://my.server/my/page?a=b&c=d you redirect to http://my.server/my/page?a=b&c=d&nocache=1234567890 with 1234567890 being a large random number

    0 讨论(0)
提交回复
热议问题