Closed petericebear closed 6 years ago
Looks like, you made it already after the last release. Can you tag a new release for the cache? :D
How come that you didn't receive the unknown option `-k'
error then?
I do not know. I just installed it and tried several options out
I mean it might not be that problem then, are you sure that with the version from master you get 304s as expected?
I just copied the changes to the files on my drive from that commit. Unfortunatly still only status 200 status codes from the images.
Hmm, wait a bit: https://www.texel.net/nl/accommodaties/vakantiehuisje
I see also a status 200 in the browser itself but it shows: 200 (from memory cache) in the network tab.
Look at this:
$ node bin/cli.js -k https://cardaci.xyz https://cardaci.xyz | grep _fromDiskCache
- https://cardaci.xyz/ ✓
- https://cardaci.xyz/ ✓
"_fromDiskCache": false,
"_fromDiskCache": false,
"_fromDiskCache": false,
"_fromDiskCache": false,
"_fromDiskCache": false,
"_fromDiskCache": false,
"_fromDiskCache": true,
"_fromDiskCache": true,
"_fromDiskCache": true,
"_fromDiskCache": true,
"_fromDiskCache": true,
"_fromDiskCache": true,
mbp-peter:chrome-har-capturer peter$ node bin/cli.js -k https://cardaci.xyz https://cardaci.xyz | grep _fromDiskCache
No _fromDiskCache
I am trying this on my OSX, latest node version: v8.11.2, chrome version 67.0.3396.62 (Officiële build) (64-bits)
_fromDiskCache
disk cache must be present (either true
or false
), are you sure that you're using the latest version? Try a git pull
.
Ah yes was an old version. Now it works. Is it possible to remove the cache after firing the script twice? I mean clean the cache in the Chrome?
If I now run the script 2 times after it, then the first request is also with the cache
Great! Bumping the new version...
If you need "advanced" features you can always use this as a library and perform the desired initialization yourself using chrome-remote-interface which is a dependency anyway.
Otherwise just run:
$ chrome-remote-interface inspect <<<'Network.clearBrowserCache()'
Hi,
i am trying to leverage browser cache foe a second load off the page. Is that possible?
I tried: xargs chrome-har-capturer -k -o output.har < urls.txt
When I view the HAR file, I don't see 304 Not Modified in the results. But when I load in the browser and look in the "Network" tab, then it works good.
Any idea's?
NB: urls.txt only conatins the same url twice.