resource-hints | Resource Hints | Awesome List library

 by   w3c HTML Version: Current License: Non-SPDX

kandi X-RAY | resource-hints Summary

kandi X-RAY | resource-hints Summary

resource-hints is a HTML library typically used in Awesome, Awesome List applications. resource-hints has no bugs, it has no vulnerabilities and it has low support. However resource-hints has a Non-SPDX License. You can download it from GitHub.

Resource Hints
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              resource-hints has a low active ecosystem.
              It has 75 star(s) with 21 fork(s). There are 68 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 24 open issues and 46 have been closed. On average issues are closed in 64 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of resource-hints is current.

            kandi-Quality Quality

              resource-hints has no bugs reported.

            kandi-Security Security

              resource-hints has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              resource-hints has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              resource-hints releases are not available. You will need to build from source code and install.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of resource-hints
            Get all kandi verified functions for this library.

            resource-hints Key Features

            No Key Features are available at this moment for resource-hints.

            resource-hints Examples and Code Snippets

            No Code Snippets are available at this moment for resource-hints.

            Community Discussions

            QUESTION

            Do browsers use resource hint (Link) headers in redirect responses?
            Asked 2019-Mar-29 at 01:38
            The problem

            I have a site, that uses a 302 redirect for new visitors to establish a new session. I've created a demo of the basic flow on my personal site:

            1. https://crenshaw.dev/redirect/index.php (302)
            2. https://crenshaw.dev/session/redirect/index.html (200)

            index.html uses resource https://mac9416.com/demos/style.css (I just needed an external domain name).

            I want to instruct the browser to connect to mac9416.com in the 302 rather than the 200.

            Potential solution

            Some browsers support resource hint headers. Here are some examples:

            EXAMPLE 5

            Link: https://widget.com; rel=dns-prefetch
            Link: https://example.com; rel=preconnect
            Link: https://example.com/next-page.html; rel=prerender;
            Link: https://example.com/logo-hires.jpg; rel=prefetch; as=image;

            What went wrong

            Dev tools shows the Link header in the initial request:

            I see the connection to mac9416.com established after the 200, immediately before the resource is downloaded.

            I expected to see the connection established immediately after the 302, or simply missing from the timeline.

            I tested using Chrome 73. The WebPageTest waterfall looks almost identical.

            Note: I'm interested in server-push solutions, but for now the site in question runs HTTP1.1.

            The question

            Am I attempting something that isn't even supported? Must resource hint headers be served on non-redirect responses only?

            The "Anonymizing redirect" section of the resource hint working draft leads me to believe it's meant to help in exactly my type of situation. But maybe I'm misreading.

            Many sites rely on redirect services for analytics, malware protection, and to anonymize the referrer before sending the user to the final destination. Because the destination is known ahead of time, a preconnect hint can be used to initiate the connection handshake with the destination origin (without revealing any private information) in parallel with the processing of the redirect - this masks the redirect latency and reduces navigation time to final destination.

            ...

            ANSWER

            Answered 2019-Mar-29 at 01:38

            Well I checked out your experiment (thanks for knocking that up!) and couldn't see anything wrong with it. I also repeated it myself on my own server and can confirm your findings: none of the major browsers seem to support resource hints across page redirects.

            As to the paragraph from the draft spec you point out, I can think of two explanations:

            1. This is a potential use case and the browsers are just not supporting it (yet).
            2. This wording is more intended for resources on the current page that have to go through a redirect first. So if for example the current page (index.html) loads www.example.com/latest/framework.js and that redirects to cdn.example.com/latest/framework.js to actually load this resource. It's notable that only prefetch and prerender explicitly note they are meant for the "next navigation" (though I tried those two out of interest and they also don't work for the redirect scenario).

            Either way I agree it could be clearer. I was going to suggest opening an issue on Github but see you already did that! Hopefully the spec authors can confirm this.

            Incidentally I tried with a JavaScript redirect instead of a 301/302 and it worked in Chrome for both HTTP link header and HTML link instructions for preconnect - suggesting again that only 200 responses are looked at for resource hints.

            An interesting question you raised! Not sure if off topic for StackOverflow but certainly piqued my interest...

            Source https://stackoverflow.com/questions/55381080

            QUESTION

            Web Performance - Resources Hints - is there any negative impact to not use the protocol inside the href of a preconnect/dns-prefetch?
            Asked 2018-Feb-12 at 09:00

            I am trying to use, as correctly as possible, browser resources hints (https://w3c.github.io/resource-hints/).

            I went on a few large websites and most of them specify the http/https protocol such as like this:

            ...

            ANSWER

            Answered 2018-Feb-12 at 09:00

            I wondered if not specifying if it's either http or https could have a impact/cost as the browser will have to fetch more information (one for http, one for https) like 2 dns information ?

            No, the browser does not have to make two requests.

            This is called a protocol relative URI - the browser will complete it to a full, absolute one using the protocol that the page this was embedded into was requested with.

            If you requested the page this is embedded into using https:// - then //foo.bar/ will become https://foo.bar/; if you used http:// only, then it will become http://foo.bar/

            This is a means to allow site authors to write their code in a “protocol agnostic” way. You can deploy a site using this to refer to external resources so that it can be reached either via HTTP or HTTPS, without having to modify all those references. And it helps prevent problems that might arise when you transfer a site from HTTP to HTTPS. If external resources were referred to using http://... in that case, the browser would block them. Using this technique, it will request the HTTPS version automatically, without any need to modify the code.

            Source https://stackoverflow.com/questions/48684137

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install resource-hints

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/w3c/resource-hints.git

          • CLI

            gh repo clone w3c/resource-hints

          • sshUrl

            git@github.com:w3c/resource-hints.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Awesome List Libraries

            awesome

            by sindresorhus

            awesome-go

            by avelino

            awesome-rust

            by rust-unofficial

            Try Top Libraries by w3c

            ServiceWorker

            by w3cHTML

            IntersectionObserver

            by w3cJavaScript

            csswg-drafts

            by w3cHTML

            html

            by w3cHTML