Iframe src caching issue on firefox

前端 未结 4 792
借酒劲吻你
借酒劲吻你 2021-02-19 06:13

I have an iframe element with a random scr attribute. When I do refresh the page every time, the iframe should load the page with different query parameters based on the src att

4条回答
  •  我在风中等你
    2021-02-19 06:55

    It's reported as a bug of firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=279048

    one workaround is resetting the src of iframe: document.getElementById('iframe_id').src = 'target_url';

    Still there will be two requests: the first request is wrong and cancelled immediately before the second request which is correct.

提交回复
热议问题