[whatwg] Client-side includes proposal
Ian Hickson
ian at hixie.ch
Mon Aug 18 21:29:55 PDT 2008
On Tue, 19 Aug 2008, Shannon wrote:
>
> You make a pretty big assumption here about the usage model of the
> Internet being corporate + ISP. You ignore:
>
> * Local testing in WYSIWYG editors.
WYSIWYG editors are quite capable of implementing a model whereby pages
are merged before being previewed, and are merged when published, removing
the need for any post-publication inclusion mechanism.
> * Embedded servers in storage devices, media centers, routers and other
> gadgets.
> * Minimalist HTTP servers for simple usage, websocket tunnels or high load
> services.
> * Users taking advantage of free hosting services with limited features (like
> Sourceforge or Geocities).
> * Charities and OSS groups with better things to spend their money on than
> hosting package upgrades.
> * Companies like many in the building and equipment hire industries that spent
> $500 on a website and call it expensive.
In all of these cases, it is quite feasible to just pre-generate the
documents with the includes directly in the content.
> * Web applications and HTML documentation on the local filesystem.
> * Autorun frontends on CDROM that are typically employed by magazine
> coverdiscs.
These aren't part of the use cases I am considering.
> I assume that by "pre-generated" you're referring to
> Dreamweaver/WebObjects templates rather than copy-and-paste.
I was really thinking of C++ preprocessor includes, but any mechanism
would be fine, sure.
> I find these irritating as quite often you are given one format but
> require another (as a FOSS user I can't/won't use Dreamweaver).
I usually just roll my own using Perl, it's like one or two lines
depending on what you want.
> > We're talking about such a small amount of data here that the latency
> > far outweighs the bandwidth cost on most connections. Given that you
> > still have to do an If-Modified-Since check, you don't really gain
> > anything here.
>
> I'm not sure where you get your statistics but these claims don't match
> my direct experience. In the typical case a web page is heavily
> dependant on included content such as CSS files, images, plugins and
> other non-embedded elements. Even geek sites like orielly.com and
> slashdot are not immune. According to websiteoptimization.com the
> orielly home page has 60 external objects. Many common sites are even
> worse. Your claim that adding HTML includes will have any noticeable
> affect on overall page loading times needs more analysis.
Most content doesn't require blocking. Those that require blocking (like
scripts) are a massive problem. Just ask any browser vendor. Safari even
ends up running a second tokeniser in parallel just to try to help this.
> > > <div id="content" style="min-height:500px">
> > > <include src="content.ihtml">
> > > </div><!-- always closes content -->
> >
> > What do you do when the CSIed page includes script that manipulates
> > content after the include? Now you have a race condition. This is just
> > as bad as blocking, if not worse, since it's now unpredictable.
>
> You do the same thing you always have when external JS or inter-page
> requests raise the same issue.
External (blocking) JS is a disaster. We don't want to be adding more
features like it. We're still trying to get out of the problems blocking
scripts added.
> > Anyway in conclusion I don't understand what CSIs give us that is
> > actually worth the massive amounts of effort they require. Just
> > generate your pages server-side or upload them to your server
> > pre-generated.
>
> As a developer I tell you this is not really a good option, and I
> disagree with your claim of "massive effort". It is a fairly
> straightforward feature as they go. Embedded SQL is a massive effort,
> WebWorkers is massive effort, client-side includes is quite trivial,
> relatively speaking. Certainly worth further investigation in light of
> its obvious benefits.
Providing client-side includes in an efficient manner is on the same kind
of scale as the other features you mention, but it doesn't have anywhere
near the same level of benefit. IMHO.
--
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg
mailing list