We are currently working in a private beta and so are still in the process of making fairly rapid changes, although obviously as usage is starting to ramp up, we will be slowing down this process.
(我们目前正在私人测试版中工作,因此仍在进行相当快速的更改,尽管显然随着使用量的增加,我们将放慢这个过程。)
That being said, one issue we are running into is that after we push out an update with new JavaScript files, the client browsers still use the cached version of the file and they do not see the update.(话虽这么说,我们遇到的一个问题是,在推出新JavaScript文件的更新之后,客户端浏览器仍然使用文件的缓存版本,而他们看不到更新。)
Obviously, on a support call, we can simply inform them to do a ctrl F5 refresh to ensure that they get the up-to-date files from the server, but it would be preferable to handle this before that time.(显然,在技术支持电话上,我们可以简单地通知他们进行ctrl F5刷新,以确保他们从服务器获取最新文件,但是最好在此之前进行处理。)
Our current thought is to simply attach a version number onto the name of the JavaScript files and then when changes are made, increment the version on the script and update all references.
(我们当前的想法是简单地将版本号附加到JavaScript文件的名称上,然后在进行更改时,增加脚本上的版本并更新所有引用。)
This definitely gets the job done, but updating the references on each release could get cumbersome.(这肯定可以完成工作,但是更新每个发行版上的引用可能会很麻烦。)
As I'm sure we're not the first ones to deal with this, I figured I would throw it out to the community.
(因为我确定我们不是第一个处理此问题的人,所以我认为我会将它扔给社区。)
How are you ensuring clients update their cache when you update your code?(更新代码时,如何确保客户端更新其缓存?)
If you're using the method described above, are you using a process that simplifies the change?(如果您使用上述方法,是否正在使用简化更改的过程?)
ask by AdamB translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…