Prevent cache in every Dojo xhr request on page

后端 未结 2 756
轻奢々
轻奢々 2021-01-26 05:30

I\'m able to intercept Dojo 1.6.1 xhr requests using IO Pipeline Topics as described here:

Dojo - intercepting XHR calls

I would like to add a time para

2条回答
  •  情深已故
    2021-01-26 06:14

    Both dojo/io/script and dojo/xhr have a preventCache parameter that does exactly what you are trying to do. So instead of trying to intercept, can you just add preventCache: true to the request arguments?

    http://dojotoolkit.org/reference-guide/1.6/dojo/io/script.html#dojo-io-script

    http://dojotoolkit.org/reference-guide/1.6/dojo/xhrGet.html#dojo-xhrget

提交回复
热议问题