Giter Club home page Giter Club logo

Comments (8)

terjanq avatar terjanq commented on May 23, 2024

Maybe it would be worth exploring when this technique would bypass the split cache? It probably mostly works when x.com requests a resource from x.com? Could you confirm? That could be presented as a nice split cache bypass.

from wiki.

NDevTK avatar NDevTK commented on May 23, 2024

I think so, ifCached_window probably could be more reliable it makes it harder to test.
Its now using the pagehide event to make the code smaller.
I will probably do more testing later.
Did you get the email I sent?

from wiki.

NDevTK avatar NDevTK commented on May 23, 2024

This seems to be more reliable

async function ifCached_window(url) {
  return new Promise(resolve => {
    checker.location = url;

    // Cache only
    setTimeout(() => {
      checker.stop();
    }, 20);

    // Get result
    setTimeout(() => {
      try {
        if (checker.location.href !== "about:blank") {
          // Origin has changed
          resolve(true);
          checker.location = "about:blank";
        }
      } catch {
        // No permission for origin
        resolve(true);
        checker.location = "about:blank";
      }
      resolve(false);
    }, 50);
  });
}

from wiki.

NDevTK avatar NDevTK commented on May 23, 2024

Split cache got disabled for me so thats why the testing was bad.

from wiki.

NDevTK avatar NDevTK commented on May 23, 2024

I would like to get it working without the window.open
window.stop() seems like a good replacement for the AbortController
Annoyingly dont know a way to reload a page bypassing cache using navigation (purge)

from wiki.

terjanq avatar terjanq commented on May 23, 2024

Annoyingly dont know a way to reload a page bypassing cache using navigation (purge)

Maybe instant win.close()? Should be quite equivalent to window.stop()

from wiki.

NDevTK avatar NDevTK commented on May 23, 2024

checker.stop() works even if its a separate window.
The issue with checker.close() is that it requires window.open every time.
Cache test works however cache refreshing does not.

from wiki.

NDevTK avatar NDevTK commented on May 23, 2024

Added in #106

from wiki.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.