为什么即使没有CORS,一些performance.getEntriesByType('resource')计时属性也为0?

时间:2019-01-16 15:19:37

标签: javascript performance timing

使用

window.performance.getEntriesByType('resource')

我经常获得具有定时属性(持续时间,connectStart,connectEnd,domainLookupEnd等)为0的资源。

在文档中,这里https://developer.mozilla.org/en-US/docs/Web/API/Resource_Timing_API/Using_the_Resource_Timing_API#Coping_with_CORS我读到了一些资源,这些资源需要CORS才能交付,并且需要Timing-Allow-Origin http标头才能返回计时信息, 但即使没有CORS,我仍会获得定时属性为0的资源。

这也不可能是与Cache相关的问题,因为我在aws lambda距离上使用由硒驱动的无头铬,因此每次都会销毁并重新创建驱动程序。

0 个答案:

没有答案
相关问题