Disable browser cache

Hi.

“First view” is a test that done with a browser that had its cache. right ?
Is there a way to disable browser cache for first view ?
Thx

Hi, I am also curious to know the answer of this question.
Is there a step where we can login via a script → turn off cache and then use logData command to record the data.
Thanks.

Not sure I 100% understand. “First View” has all of the normal browser caches enabled but they are completely clear before each run so disabling it doesn’t really make any sense.

As far as clearing a cache mid-script, that’s a lot trickier because we can clear the disk cache but a lot of browsers also have an in-memory cache which may or may not get cleared (there is a clearCache script command that should work on Chrome and IE but your mileage may vary).

If you really need a clear cache as well as authentication, the best way is to record a session cookie from your local browser and use the setCookie command to populate the test with the same session. As a bonus it’s also safer because you can log out on your desktop and the cookie becomes invalid.

1 Like

setCookie does not work for me !! Tried it out in the desktop version as well.
Can someone please post an example ? I am just trying to see where I am making a mistake.

The desktop version returns a ‘script error’ : failed for it.
Thanks.
[hr]
My exact question is, which cookie should be passed and the syntax ? I can see multiple cookies in the request header, and the syntax in the documentation is only for one.
[hr]
Using the Firefox Extension - View Cookies, there can be several cookies on the page.

You can pass multiple set cookie commands, one for each cookie.