[TYPO3-dev] adding a javascript file so that it is merged with the other ones

Ivano Luberti luberti at archicoop.it
Thu Oct 2 16:09:31 CEST 2014


Hi Casper

Il 02/10/2014 10:09, Caspar Stuebs ha scritto:
> Hi Ivano.
>
> first of all the question, why you don't like to include that js file on
> every page?

the web site where my plugin is installed will serve content also to
mobile devices but those will not use my plugin typically , so I was
thinking to avoid mobile devices to download unneeded javascript,
serving different standard javascript for different sections of the web
site.


>
> If you add additional js concatenated with standard js, the visitor
> downloads the standard js on standard pages, but if he is coming to the
> special pages, he will download the additional js with the standard js
> together. means, he needs to download the standard js twice.

I hope I have answered above

> To prevent, that the standard js is downloaded twice you have to
> posibilities. Either you add the additional js always, or you add it in a
> seperate file.


so is not possible to have two standard javascript for two different
part of the web site

> Back to your question: I had a look to the function addJsFile(), but I did
> not seen a reason, why it should not be concatenated at all, because by
> default "$excludeFromConcatenation = FALSE"
>
> May it be, that your plugin is uncached and the default js is stored in
> cache and due to that it will not work? In this case I would try to make
> the plugin cached and check, if it is still not being concatenated.

hmmm, sure the plugin is not chached we are developing and not caching
anything....I should have thought about it.
Thanks: I'll check how it works caching.



-- 
==================================================
dott. Ivano Mario Luberti
Archimede Informatica societa' cooperativa a r. l.
Sede Operativa
Via Gereschi 36 - 56126- Pisa
tel.: +39-050- 580959
tel/fax: +39-050-9711344
web: www.archicoop.it
==================================================





More information about the TYPO3-dev mailing list