Live data from Hacker News

Structured Page Fragments by YouTube

youtube.github.io

1–10 of 19 posts

Re: Structured Page Fragments by YouTube

#4
I love YouTube. I use it daily. I have some grief with the interface though. It seems like it doesn't want to be a webpage. So much of it feels custom-made as opposed to browser based. Navigation, scrolling, and image loading breaks for me all the time regardless of browser. So for me it feels risky to adopt their interface implementation.

I realize that YouTube is a crazy hard problem to tackle, and that is probably why stuff like this is necessary.

Re: Structured Page Fragments by YouTube

#5

This looks great. I'm curious how the server knows which fragment of the page to return... or is there an assumption with this that only 1 section of your site changes from page to page?

I haven't used it myself, but judging from (a brief review of) the documentation, the server dispatches on the request URI and responds with content updates for an arbitrary number of fragments, each identified by DOM ID.

Re: Structured Page Fragments by YouTube

#7
post #5

This looks great. I'm curious how the server knows which fragment of the page to return... or is there an assumption with this that only 1 section of your site changes from page to page?

I haven't used it myself, but judging from (a brief review of) the documentation, the server dispatches on the request URI and responds with content updates for an arbitrary number of fragments, each identified by DOM ID.

Ah, gotcha. So you are potentially returning more content then will be rendered, but still a faster situation then a full page reload. Thanks!

Re: Structured Page Fragments by YouTube

#8
post #6

This sounds surprisingly like the old HTML "frames"..

I suppose they are attempting to achieve the same goal, but this does not suffer from the drawbacks that frames do (most notably the weird "which page am I actually on"? confusion and potential for frames-within-frames-within-frames-etc).

Re: Structured Page Fragments by YouTube

#10
post #5

Earlier quoted context omitted.

I haven't used it myself, but judging from (a brief review of) the documentation, the server dispatches on the request URI and responds with content updates for an arbitrary number of fragments, each identified by DOM ID.

Ah, gotcha. So you are potentially returning more content then will be rendered, but still a faster situation then a full page reload. Thanks!

Well, no; when I say "arbitrary number of fragments", I mean there isn't a set limit established by the client code, not that the server should promiscuously return data the client may or may not actually need. A correctly designed application should never make a state transition that requires the server to guess about what the client's going to need to render.
Post reply on HN