• Resolved Vidyut

    (@vidyut)


    Would be problematic to load styles and scripts for every view – essentially nullifying the cache. Would it be possible to push them only if the referrer is not the same site? Would probably go slightly slower for any resources not already loaded at first view, but would save bandwidth for many clients…

    https://wordpress.org/plugins/http2-server-push/

Viewing 1 replies (of 1 total)
  • Plugin Author Dana Ross

    (@csixty4)

    The HTTP/2 protocol already has you covered. The browser can respond to a PUSH_PROMISE message and send a RST_STREAM to cancel the download if it already has a copy of the file. Or, it can wait until the server sends a HEADERS message and check the etag to see if it matches the cached copy before sending RST_STREAM.

    There’s a chance the server may have sent a couple frames of data that the browser needs to discard, but in my experience this all happens so quickly it’s not a concern.

Viewing 1 replies (of 1 total)
  • The topic ‘Is it possible to push the resources only if referrer is not the same site?’ is closed to new replies.