让Firefox 3与JSUnit一起使用

时间:2009-03-06 15:07:33

标签: javascript caching firefox-3 jsunit

到目前为止,这是我尝试过的,我正在使用Firefox 3.07

  1. 确保在 about:config 中将 browser.cache.check_doc_frequency 属性设置为 1 ,浏览器会将其解释为“每次检查新页面。”

  2. 确保在 about:config 中将属性 security.fileuri.strict_origin_policy 设置为 false

  3. 打开浏览器时,请务必使用 testpage 参数指定要运行的 testrunner.html 页面,< IE: file:///.../testRunner.html?testpage = c:/temp/someTest.html

  4. 在最后添加一个额外的随机参数,以确保缓存消失。

  5. 以上所有内容似乎都有效,但由于某些愚蠢的原因,它仍然缓存我的 *。js 文件。我真的认为这将与更改最后的随机参数以杀死缓存有关,但这似乎没有做到这一点。还有什么办法可以让JSUnit与Firefox 3.07一起使用?这些文件位于我的硬盘上。

5 个答案:

答案 0 :(得分:0)

您是否尝试过CTRL + SHIFT + R而不使用缓存进行刷新?

答案 1 :(得分:0)

不,这不起作用。问题是它正在缓存* .js文件。当您执行CTRL + SHIFT + R时,它只刷新测试运行页面。

答案 2 :(得分:0)

到目前为止,这是我尝试过的,我正在使用Firefox 3.07

1

  Make sure in about:config that the property browser.cache.check_doc_frequency is set to 1 which the browser interprets as "check for a new page every time".

2

  Make sure in about:config that the property security.fileuri.strict_origin_policy is set to false.

3

  When opening your browser be sure to specify to the testrunner.html page which test you want to run using the testpage parameter,

  I.E.: file:///.../testRunner.html?testpage=c:/temp/someTest.html

4

  Tak an additional random parameter on the end to ensure that the cache is gone.

上面的所有内容似乎都有效,除了它仍然是因为某些愚蠢的原因而缓存我的* .js文件。我真的认为这将与更改最后的随机参数以杀死缓存有关,但这似乎没有做到这一点。还有什么办法可以让JSUnit与Firefox 3.07一起使用?这些文件位于我的硬盘上。

答案 3 :(得分:0)

尝试在about:config。

中编辑network.http.use-cache属性

例如,network.http.use-cache = false

答案 4 :(得分:0)

出了同样的问题拉我的头发。

这最终对我有用:

Firefox菜单:工具/ Web开发人员/禁用/禁用缓存