Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wonder what the trade off is for 1KB of text or an extra HTTP request.


The extra HTTP request only has to be performed on pinning, probably only once (or at least only once in a long time depending on the HTTP headers, and the refresh of the file can be performed asynchronously by the browser when and where it thinks it should check) and only by users actually able to pin (so IE9 users).


The external resource can be cached, pre-generated, shared, managed separately from your page templates.

The main argument seems to be that the metadata involved here is to do with the site, not the page, whereas <meta> tags should be for resource-specific use.


The main advantage of a separate file is that it can be cached by the client.


Well...that's a good question from a performance standpoint, but it's more than that. Readability is important too.


I up voted both these comments because it just goes to show that different people care about different things. It is not a matter of better, just a matter of preference.


The tradeoff is the same as an external JavaScript or stylesheet, which noone seems to mind. Plus, only some clients will be downloading the menu.xml.


Bear in mind that a HTTP Request is significantly slower than the bytes in the page. A request could be anything from .25s to 2 whole seconds, if the bandwidth is saturated. Not least problems with blocking other parallel downloads and delaying the initial paint. HTTP requests that are not images or the CSS are to be absolutely avoided!


Since this isn't used until the menu is pinned, and doesn't show on the page, the time it takes to download should only be taken when the user requests that it be pinned. This shouldn't hold up the page being rendered, since it is not page content.

Edit: Additionally, how does what's in the pinned menu get updated? Does it need to make a full page request to get the new items? This will needlessly inflate pageview numbers in that case (I'm sure the "fix" for that will be that Microsoft will change the User Agent to say that it's not the browser but rather than pinned menu making the request). As for implementation, does the browser create the menu from the this and it's static? Or does the URL to the page get passed to the menu bar where it is pinned and then the menu bar is responsible for making the request? Or does the browser actually run the menu bar -- this seems like the wrong kind of integration.


Wouldn't the trade-off be between an extra 1KB on every page vs. a single extra HTTP request per user?


Not exactly. It's more like 250-300 bytes gzipped and it's delivered through an established request.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: