[Mediawiki-l] efficiently adding javascript / css to page header
Ittay Dror
ittayd at qlusters.com
Thu May 17 14:58:54 UTC 2007
Hi,
I've written some tags that require javascript packages. Naturally, I
want to link to them in the <head> section.
The only way I know how to do it now is to add a hook to
'BeforePageDisplay'. The problem is that then I don't know whether the
page actually uses the tag, so a lot of javascript references are added
to pages that don't use the tags (and even with caching, the browser
needs to validate).
If I add the js reference from inside the tag handler, then it is not
added when the content is cached.
So, is there a way of better associating javascript with a page?
Thanks,
Ittay
--
*Ittay Dror*
Chief Architect,
R&D, Qlusters Inc.
Web: qlusters.com <http://www.qlusters.com/>
Email: ittayd at qlusters.com <mailto:ittayd at qlusters.com>
Phone: +972-3-6081994
openQRM <www.openqrm.org> - Data Center Provisioning
------
I own this number: D0E008A921FF04A9DB8C12668E4315F4. Get your own at
http://www.freedom-to-tinker.com
More information about the MediaWiki-l
mailing list