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.

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' ;
  • Is JDEBUG always defined? – MrWhite Apr 23 '14 at 9:44
  • 1
    Yes, as it is checked in index.php file. github.com/joomla/joomla-cms/blob/staging/index.php#L34 – Shyam Apr 23 '14 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 '14 at 11:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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