Require.js with Tornado

In Tornado 3.1, compute_etag was added.

compute_etag sets the Etag header based on static url version.

This allows efficient If-None-Match checks against cached versions, and sends the correct Etag for a partial response (i.e. the same Etag as the full file).

So it's important to configure the module file:

require.config({
    urlArgs: 'bust=1'
})

to load the changed files.

Make sure just add urlArgs config in top js file, the later loaded ones will overwrite this value.

喜欢这篇文章就分享到微博吧!
留言请发送到
微信公众帐号
“技术派”

修订历史:


知识共享许可协议

关注@好看簿的蚂蚁

探讨技术、设计、人文和商业
相关的创业话题