--
You received this message because you are subscribed to the Google Groups "Toolkitchen" group.
To unsubscribe from this group and stop receiving emails from it, send an email to toolkitchen...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Isn't this exactly the type of thing content negotiation is meant to solve?
E.g., if requested as text/html, the server could respond with a verbose self-documenting definition that sucks up lots of bandwidth. But if requested as text/html+webcomponent (or whatever; text/html+componentonly?) it could respond with the minimum amount of data necessary, and no docs.
Then, of course, browsers would request web components with the Accept header preferring text/html+webcomponent, and get the benefits of less overhead. But when the user views source and clicks the link to the component, they end up on a nice self-documenting page.
________________________________________
From: toolk...@googlegroups.com [toolk...@googlegroups.com] on behalf of Mike Kamermans [nih...@gmail.com]
Sent: Thursday, March 28, 2013 11:26
To: toolkitchen
Subject: Re: Playing with web components and custom elements
- Mike
--
--
You received this message because you are subscribed to a topic in the Google Groups "Toolkitchen" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/toolkitchen/T8p9rnvFZCk/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to toolkitchen...@googlegroups.com.
At first I thought this killed the idea. But upon mulling it over about it, I’d say that’s not a real concern:
· If users don’t have control over the server, they’re screwed when it comes to optimizing anyway. They’re not going to be able to gzip, or set cache headers, for example. An extra KB or so of docs won’t hurt them.
· In practice, most users who are hosting on shared web site services are able to at least edit .htaccess files, which from my understanding do let you specify certain files as certain MIME types, and probably do full content negotiation through rewrite rules (?).
· In the thick-client scenario, file size doesn’t matter. That is, when building Windows 8 apps, I’m not going to minify my JavaScript; similarly, I’m not going to remove documentation from my web components.
Sure, but that should still work---the browser will just download the entire self-documenting web component file.
In case it wasn’t clear, I wasn’t proposing
Accept: text/html+webcomponent
but instead
Accept: text/html+webcomponent, text/html; q=0.9, */*; q=0.8