[dokuwiki] Re: jQuery dev

  • From: Andreas Gohr <andi@xxxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Wed, 22 Jun 2011 16:07:00 +0200

> I didn't checked the DW core

You should do this. Makes the discussion much easier ;-)

> but I guess that editor/admin JS only is
> inserted when it is needed.

No. We had that a while ago, but decided to always load all javascript
because plugins started to need "backend" JavaScript in the frontend.
Eg. the discussion plugin wanted to show the editor toolbar....

> That means that a plugin author can only use one local js file, right?

No. We have a way to include JavaScript files. See devel:javascript

> What happens if it is necessary to load some JS from a remote source
> like a CDN?

You can use an action plugin to add addtional script tags in the head.

But yes, for this a function to load additonal scripts on demand might
be helpful.

> Even if all users enable JS (what I hope for :) ) doesn't mean that
> they need all CSS.

HTTP header overhead makes this discussion moot. For the few rules
we're talking about here it's cheaper to load a single, whitespace
compressed, gzipped files than loading various tiny files.

Andi

-- 
splitbrain.org
-- 
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts: