Web worker won't start in IE unless the cache is cleared

前端 未结 2 1271
后悔当初
后悔当初 2021-02-09 06:22

I\'m having a really weird bug in my HTML5 script. I wrote a sharepoint app completely in OData which uses a few HTML 5 webworker to do the number crunching in the background. T

相关标签:
2条回答
  • 2021-02-09 06:51

    using a time based querystring parameter prevents caching showing http status 200 on each refresh. tested on latest chrome, ie, ff;

    var opus = new Worker("worker.js?q=" + new Date().getTime().toString() );
    

    to be honest this a long shot as i do not have sharepoint right now

    0 讨论(0)
  • 2021-02-09 06:51

    SharePoint sends the header:

    Content-Disposition: attachment; filename="xyz.js"
    X-Download-Options:  noopen
    

    and the IE Web Worker Implantation then does not run this web worker. (Tested in IE11) In the IE Network Monitor the request still on pending, even the Response text is visible.

    I know so fare two workarounds:

    1. Place the web worker js in the layouts folder (needs a Farm Solution, with the downside of this)
    2. Set the Browser File Handling for the Web application to Permissive (maybe your security is not amused)
    0 讨论(0)
提交回复
热议问题