Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Cypress clear the browser cache before each test?

Tags:

cypress

Cypress clears all cookies and local storage before each test. Does it also clear the browser's file cache?

like image 678
Arne Evertsson Avatar asked Oct 26 '17 09:10

Arne Evertsson


1 Answers

EDIT: Cypress automatically clears browser cache before the browser launches in Version 0.20.0. So, the cache will be cleared between each spec file is run.

No, Cypress does not clear browser cache before each test. Cypress respects the cache headers of your server. So if they are set, the browser will cache those files. This isn't really documented anywhere exactly, but I'm a developer at Cypress so know this is how it works.

If you want to see some different behavior, I suggest opening an issue on the OS Cypress project.

like image 84
Jennifer Shehane Avatar answered Oct 18 '22 03:10

Jennifer Shehane