How to prevent Joomla caching CSS & JS

For Joomla! 2.5 Coding related discussions, please use: http://groups.google.com/group/joomla-dev-general
Note: All 1.6, 1.7 and 3.5 releases have reached end of life and should be updated to 3.x.

Moderator: ooffick

Forum rules
Please use the mailing list here: http://groups.google.com/group/joomla-dev-general rather than this forum.
Locked
s512
Joomla! Apprentice
Joomla! Apprentice
Posts: 26
Joined: Tue Nov 08, 2011 10:18 am

How to prevent Joomla caching CSS & JS

Post by s512 » Tue Apr 24, 2012 8:34 am

I have a line of javascript that requires the use of some external javascript - however, as Joomla combines all scripts into one PHP file, this loads before the external script and produces an error.

I'm using $document->addscript(); in a system plugin to add the javascript file to the page. Of course I could just add the <script> tags, but is there any way to disable this JS caching?

The system cache plugin is disabled, and cache turned off in global config. I thought maybe it was caching via my template's gantry framework, but no - this is switched off too. Does anyone know anywhere else I can check to disable caching?

Many thanks!

User avatar
pxforti
Joomla! Hero
Joomla! Hero
Posts: 2755
Joined: Wed Apr 04, 2007 8:54 pm
Location: Driggs, Idaho

Re: How to prevent Joomla caching CSS & JS

Post by pxforti » Tue Apr 24, 2012 2:14 pm

I don't think Joomla caches js or css by default. Probably gantry is doing it via the compress css / js function.
Joomla Website Design / CS-Cart Website Design
http://writenowdesign.com

s512
Joomla! Apprentice
Joomla! Apprentice
Posts: 26
Joined: Tue Nov 08, 2011 10:18 am

Re: How to prevent Joomla caching CSS & JS

Post by s512 » Tue Apr 24, 2012 4:47 pm

OK, thanks for your input. It's definitely turned off.. but I'll get onto the gantry people to try and get it sorted...


EDIT: Found the problem!! (well, solution to my problem) It's the RokGZipper plugin combining the files. Disabled :)

Thanks again.


Locked

Return to “Joomla! 2.5 Coding”