Preload, prefetch and other link tags
1–10 of 28 posts
Re: Preload, prefetch and other link tags
#2As specified in the article, the handshake is:
TLS handshake (only for HTTPS sites). Perform two roundtrips
(a message goes client → server → client → server → client) to initiate a secure TLS session
Is there any part of that which could be used to send a custom message to the client? A short bit of text or a number or something. Don't really have a practical use for this, just more of an esoteric one.Re: Preload, prefetch and other link tags
#3Re: Preload, prefetch and other link tags
#4Re: Preload, prefetch and other link tags
#5Random question: for the preconnect, is there some Javascript API now that allows for the monitoring of the TLS handshake? As specified in the article, the handshake is: TLS handshake (only for HTTPS sites). Perform two roundtrips (a message goes client → server → client → server → client) to initiate a secure TLS session Is there any part of that which could be used to send a custom message to the client? A short bi…
Good breakdown of the handshake here: http://www.moserware.com/2009/06/first-few-milliseconds-of-h... (skip down to the client hello)
Re: Preload, prefetch and other link tags
#6I'm not sure where the submitted title came from; it's not the title on the article, and it's factually incorrect -- there's only one tag (LINK), which includes an attribute (REL) that can be set five different ways. That's a lot cleaner and more orderly than "5 different tags to preload something" suggests.
Re: Preload, prefetch and other link tags
#7Random question: for the preconnect, is there some Javascript API now that allows for the monitoring of the TLS handshake? As specified in the article, the handshake is: TLS handshake (only for HTTPS sites). Perform two roundtrips (a message goes client → server → client → server → client) to initiate a secure TLS session Is there any part of that which could be used to send a custom message to the client? A short bi…
Don’t believe so as during the first round trip in http1 (wasn’t this “fixed” in http2? Silly o’clock, can’t remember, anyways) the client and the server are just working out which cyphers to use.
If you are trying to pull data from the same domain, you have already set up a connection you can reuse saving the need to repeat the need for the first round trip on your next connection to the server. So you are only really losing that first round trip on the first connection. So even if you were pinging another domain regularly as long as you are using a server configured to keep the connection alive for long enough you are not really going to save much any time then just doing it the standard way.
I guess (never tried) you could create your own raw socket connection with say webasm but Browsers do here hardest to keep you away from the raw socket level and I believe they also do even in webasm. (just thinking out loud...)
Then smuggle in your value based on the the cyphers you are requesting the client to pick from. But at which point you might as well just be using plain old un-encrypted socket connections.
EDIT: If you are just trying to send metadata along with a xhr response then you can just send custom headers along with the response and read them with getAllResponseHeaders(), just remember to set the Access-Control-Expose-Headers header too include the custom headers you want to expose to JS.
If you are trying to push data from the client to the server I guess you could do it via DNS. Make a request to http(s)://uuid.part1.thisisamessage.example.com and http(s)://uuid.part2.sentoverdns.example.com and on your dns server record the requests, resemble the parts and you have your data. You could bitbang data back to the client by having the dns reply with a server or not. It would be slow as hell (as your making a dns request and opening up a connection for each bit) but it could be done but unless you are trying to be sneaky (and it’s not that sneaky at all) it’s not worth the hassle over just opening up a “full fat” connection and reusing that connection. (Again just unable to sleep thinking out loud...)
Re: Preload, prefetch and other link tags
#8I'm not sure where the submitted title came from; it's not the title on the article, and it's factually incorrect -- there's only one tag (LINK), which includes an attribute (REL) that can be set five different ways. That's a lot cleaner and more orderly than "5 different tags to preload something" suggests.
Re: Preload, prefetch and other link tags
#9I find it interesting that he is inconsistent in his usage of . Some of his markup has a closing slash and some of it doesn't. However, my main gripe, is that the HTML spec has never specified or required a closing slash. While it is allowed, putting that slash there has no meaning, it does nothing, and the spec tells browsers they are to ignore for those reasons.
When I ask why some people insist on putting it there, I get wildly different, unreasonable answers.
"It's just a bad habit I picked up."
How do you pick up a bad habit for something that does not exist?
"I do it so it's XHTML or XML compatible."
Well, you aren't serving it as either XHTML or XML and are very unlikely to do that. In addition, the rest of your HTML is probably not XHTML or XML compatible on top of that.
"The spec does allow it."
It allows it, as I always tell them, due to backwards compatibility with (X)HTML uses in the past, but it also says you're wasting your time and effort. See my comment at the top.
To end this, no HTML specification in the history of the universe has ever stated you need to or should put a closing slash on or or or any other HTML tag and there is no example of such usage anywhere in said documentation either.
Re: Preload, prefetch and other link tags
#10Just because I can... I find it interesting that he is inconsistent in his usage of . Some of his markup has a closing slash and some of it doesn't. However, my main gripe, is that the HTML spec has never specified or required a closing slash. While it is allowed, putting that slash there has no meaning, it does nothing, and the spec tells browsers they are to ignore for those reasons. When I ask why some people insi…