Git Product home page Git Product logo

Comments (7)

godDLL avatar godDLL commented on May 30, 2024

Should the browser then replay the whole request history? That could be slow and convoluted.
Or do you just want to see a rendering of the *HTML in response body, as it is?

from htty.

njonsson avatar njonsson commented on May 30, 2024

The latter. I’m thinking maybe we write the body of the response (or the request) to a temp file and then launch the default browser to view it.

from htty.

godDLL avatar godDLL commented on May 30, 2024

Sounds somewhat useful, but that's not going to allow JS running in that page to access cookie/session storage, or resources that are linked relative to the original domain.

from htty.

njonsson avatar njonsson commented on May 30, 2024

Agreed. I was thinking of this as a WYSIWYG preview rather than “let me start using the browser where htty left off.”

Perhaps that makes it more annoying than useful.

Would it be better to attempt a Lynx-style text-only rendering of the markup?

from htty.

godDLL avatar godDLL commented on May 30, 2024

If you do that (and a couple more things, like curses, and general usability) – and that's not a small task, but if you would set out to – you would be getting SEO/crawler/accessibility so much easier. This could later be extended to request sequences that can be replayed by HTTY, by the text-only browser, and by the default graphical browser. And those sequences could become trees, with multiple routes you could take, etc.
And then you'd solve the World in 42 steps.

The WYSIWYG preview is really just fine. It's a visualisation of the response body, nothing more; it is useful on it's own. Not plenty useful, but nice to have.
You should choose your battles.

from htty.

njonsson avatar njonsson commented on May 30, 2024

See http://github.com/htty/htty/issues/#issue/17.

from htty.

njonsson avatar njonsson commented on May 30, 2024

v1.3.0 (just released) includes new commands body-request-open and body-response-open for launching the default viewer assigned to the content type. Options allow you to override the default viewer launched (e.g., use Firefox instead of Chrome).

from htty.

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.