httpswitchboard icon indicating copy to clipboard operation
httpswitchboard copied to clipboard

Block javascript access to cookies

Open coffeemakr opened this issue 11 years ago • 1 comments

I'm aware that the primary goal of HTTPSB is the control of network actions. But my problem is when you don't want a site to use cookies but you have to enable javascript, they can set them and read them back via document.cookie.

I don't know how hard it would be to execute something like the following before page loading:

document.__defineGetter__("cookie", function() { return '';} );
document.__defineSetter__("cookie", function() {} );

This would prevent all cookie-javascript actions. Maybe I'm not alone with this idea.

coffeemakr avatar Jul 16 '14 14:07 coffeemakr

Another idea is that the HTTPSB could block cookies via chromes site settings.

coffeemakr avatar Jul 16 '14 14:07 coffeemakr