When adding items to the cart, the bib_list or intranet_bib_list cookie is set. When 'emtpy and close' is used the value of the cookie is set to /, but we should just remove it instead.
I don't find this to be true. The delCookie function in basket.js sets the value of the bib_list cookie to null, sets the path to /, and the expiration to "now minus one" to make it expired.
In my test (Firefox, Windows 10), the cookie is gone after I empty the cart in both the OPAC and staff client.
Thx Owen, I'll retest. I was using the firefox build in tools to keep an eye on cookies being added and updated.
My cookies seem to be somehow messed up, will try again later.
Retested: In staff it worked nicely (apart from bug 20967 found), but in the OPAC the bib_selected cookie remained with a value of %5B%5D after emptying the cart.