How to prevent Browser/Local caching?

I got this code posted here:

and modify it for XenForo 2 usage:

addEventListener('fetch', event => {
  event.respondWith(noCacheOnCookie(event.request))
})

async function noCacheOnCookie(request) {
  // Determine which group this request is in.
  const cookie = request.headers.get('Cookie')
  const cacheSeconds = 3600
  if (cookie 
    && (
      cookie.includes(`xf_user`)
      || cookie.includes(`xf_session_admin`)
      || cookie.includes(`xf_lscxf_logged_in`)
    )) {
    const bustedRequest = new Request(request, { cf: { cacheTtl: -1 } })
    const response = await fetch(bustedRequest)

    const newHeaders = new Headers(response.headers)
    newHeaders.append('xf-cache-busted', `true`)
    return new Response(response.body, {
      status: response.status,
      statusText: response.statusText,
      headers: newHeaders
    })
  } else {
    // Edge Cache for 1 hour
    return fetch(new Request(request, { cf: { cacheTtl: cacheSeconds } }))
  }
}

How can I modify the code to prevent Browser from caching it locally?
I want every request be served from Cloudflare Edge.
It cause some issues after login then logging out.

Thanks!