9

Should a sites development be completed prior to setting the compression for site and jquery? If so then what would happen if you then need to do maintenance of the site further down the track.

1 Answer 1

7
  1. You should maintain the uncompressed version for development.
  2. Use any tool to compress the javascript files automatically.
  3. if Joomla debug mode is true, include un-compressed files, else include compressed files.

Tip

Checking debug mode in joomla.

echo JDEBUG ? 'debug mode is on' : 'debug mode is off' ;
3
  • Is JDEBUG always defined?
    – MrWhite
    Apr 23, 2014 at 9:44
  • 1
    Yes, as it is checked in index.php file. github.com/joomla/joomla-cms/blob/staging/index.php#L34 Apr 23, 2014 at 10:31
  • Ok, that would seem to suggest that it is safe to assume that it is. In fact, it appears to be defined in /includes/framework.php which is included earlier in index.php. (My initial concern was that if JDEBUG is not defined then the above statement will evaluate to true, which is probably not correct. I encountered this sort of thing whilst debugging WordPress a while ago; hence my concern.)
    – MrWhite
    Apr 23, 2014 at 11:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.