mirror of
https://github.com/notherealmarco/vue-quic-test.git
synced 2025-05-05 12:32:34 +02:00
Ignore cached responses
This commit is contained in:
parent
dd09227f9a
commit
645bb8a6df
1 changed files with 8 additions and 5 deletions
11
src/App.vue
11
src/App.vue
|
@ -11,7 +11,7 @@ onMounted(() => {
|
||||||
console.log(`Initial request: ${proto}.`)
|
console.log(`Initial request: ${proto}.`)
|
||||||
|
|
||||||
setTimeout(async function () {
|
setTimeout(async function () {
|
||||||
while (count.value < 100 && proto !== "h3") {
|
while (count.value < 30 && proto !== "h3") {
|
||||||
console.log(count.value)
|
console.log(count.value)
|
||||||
|
|
||||||
const response = await fetch("/?id=" + Math.floor(Math.random() * 1000000));
|
const response = await fetch("/?id=" + Math.floor(Math.random() * 1000000));
|
||||||
|
@ -20,13 +20,16 @@ onMounted(() => {
|
||||||
count.value++
|
count.value++
|
||||||
}
|
}
|
||||||
|
|
||||||
count.value = performance.getEntries().length
|
count.vaule = 0
|
||||||
|
|
||||||
performance.getEntries().forEach(entry => {
|
performance.getEntries().forEach(entry => {
|
||||||
if (entry.nextHopProtocol === "h3") h3_count.value++
|
if (entry.nextHopProtocol !== undefined) {
|
||||||
else if (entry.nextHopProtocol === undefined) count.value--
|
if (entry.nextHopProtocol === "h3" && entry.transferSize > 0) h3_count.value++
|
||||||
|
|
||||||
|
if (entry.transferSize > 0) count.vaule++
|
||||||
|
|
||||||
if (entry.nextHopProtocol !== "") proto = entry.nextHopProtocol
|
if (entry.nextHopProtocol !== "") proto = entry.nextHopProtocol
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (proto === "h3") proto = "HTTP/3"
|
if (proto === "h3") proto = "HTTP/3"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue