Git Product home page Git Product logo

Comments (4)

Shrinks99 avatar Shrinks99 commented on June 21, 2024

Can replicate, looks like a replay issue? Moving to ReplayWebpage.

from replayweb.page.

ikreymer avatar ikreymer commented on June 21, 2024

Took a quick look. This may actually be a capture issue under the hood - there is an empty POST request that is being incorrectly recorded as a GET request. However, there may be also additional issues on top of that.

from replayweb.page.

Shrinks99 avatar Shrinks99 commented on June 21, 2024

sigh oops. This is the https://robertsspaceindustries.com/api/starmap/bootup 404? Seems to be within the WACZ I made. Unsure about the request type though.

from replayweb.page.

ikreymer avatar ikreymer commented on June 21, 2024

This is fixable but involves not 1 but 2 tricky edge case scenarios:

  1. When storing a POST request with no/empty body, ArchiveWeb.page actually just treats it as a GET request, because the body is missing. However, ReplayWeb.page attempts to match it as a POST request. This should be addressed by either changing ArchiveWeb.page, or changing ReplayWeb.page to behave the same way (if no POST data, even though a POST request is made, just treat it as a GET, and not look for &__wb_method=POST query arg).

  2. The site uses an <object> tag for SVG rendering, however, <object> tag don't work well with service workers (see: w3c/ServiceWorker#249). The best option is to actually rewrite an <object> tag to an iframe if the type is image/svg+xml. We also want the same behavior for PDFs, already partially implemented. For server side rewriting, can just replace <object> -> <iframe> if the type attribute matches. However, it becomes a bit more tricky when the element is created dynamically and events are added, eg:

const element = document.createElement("object")
element.type = "image/svg+xml";
element.addEventListener("load", ...)

We need a way to create either an <object> or an <iframe> based on the object type, but it is set later, so can't determine it in createElement. Replacing the element later is also tricky, as calling code will be pointing to a dead element.

In testing, when forcing all object -> iframe, this works, but this may break other things (eg. if is a flash, etc..). A possible workaround may be to create some intermediate proxy object, and actually create an object or iframe when appendChild() is called...

Just forcing the object to iframe does result in a working replay:
Screenshot 2024-01-09 at 12 14 00 AM

from replayweb.page.

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.