[TYPO3-ect] general approach for JS
Steffen Kamper
steffen at sk-typo3.de
Mon Sep 10 14:57:05 CEST 2007
Hi Ries,
"ries van Twisk" <typo3 at rvt.dds.nl> schrieb im Newsbeitrag
news:mailman.3353.1189428545.17142.typo3-team-extension-coordination at lists.netfielders.de...
> Hey Steffen,
>
> my rvt_dojo extension does include additional dojo header
> on-request when the page get's generated. However the main
> dojo library is still needed (which is rather large).
>
> Often in my extensions and pages I found it necessary to include
> a JS library everywhere simple because I needed
> to have some $ function or something similar.
>
> I do think it's easy to post-process a page and put teh JS files
> after the page, and the end like you mention it. But I know at least
> that some of my pages will break since I don't always use on-load...
>
> Ries
i know there are some complicate aspects.
Using <body onload="..."> is not necessary, js itself can do it by
window.onload=function(){...}
I try to find a "most" general solution for that, my ideas are atm only
rough ideas, that's why i like to start this discussion.
vg Steffen
>
>
> On Sep 10, 2007, at 7:37 AM, Steffen Kamper wrote:
>
>> Hi,
>>
>> while studying the Yahoo rules for speed optimization [1] (especially
>> Rule
>> #6) JS should be moved to the bottom.
>> I know that is not possible all the time, but the libs are included in
>> TYPO3
>> in head. If i use extensions, i have no possibility to influence this.
>>
>> So i come to the conclusion, that the best thing would be a general
>> JS-Collector Object. There all JS could be collected and rendered by
>> pagegen-script.
>> My wishes for that would be
>> - categorization (include a lib/snippet, may be some standards for
>> standard
>> libs e.g. mootools, prototype etc.)
>> - configuration with TS to allow enable/disable including for some pages
>>
>> e.g. there is image lightbox, which includes prototype etc. It's only
>> necessary on pages where pictures are defined as lightbox images, other
>> pages don't need this inclusion.
>> there is ExtJS inclusion but is only needed on pages having ExtJS
>> widgets.
>> etc...
>>
>> I will start a proof of concept for this and would be glad if you could
>> write your ideas / proposals.
>>
>> vg Steffen
>>
>>
>> _______________________________________________
>> TYPO3-team-extension-coordination mailing list
>> TYPO3-team-extension-coordination at lists.netfielders.de
>> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-team-
>> extension-coordination
>
> --
> Ries van Twisk
> Freelance TYPO3 Developer
> email: ries at vantwisk.nl
> web: http://www.rvantwisk.nl/
> skype: callto://r.vantwisk
> Phone: + 1 810-476-4193
>
>
>
>
>
>
More information about the TYPO3-team-extension-coordination
mailing list