for (var i = 0, l = details.responseHeaders.length; i < l; ++i) {
Even then you could do it as a for loop with an empty increment clause, of course. Or even use a one-liner for loop with no body:
function blockCookies(details) { for (var headers = details.responseHeaders, i = headers.length - 1; i > -1; headers[i].name === "Set-Cookie" ? headers.splice(i, 1) : i--); return {responseHeaders: headers}; }
Even then you could do it as a for loop with an empty increment clause, of course. Or even use a one-liner for loop with no body:
But that’s crazy talk. Leave optimisations that to the minifier if it feels so disposed.