Optimization tools prevent CSS & JS from loading

More
14 May 2013 11:12 - 11 Dec 2015 14:50 #1 by Demis [Fox-Labs]
Optimization tools prevent CSS & JS from loading was created by Demis [Fox-Labs]
Symptoms
When things work well, Fox Contact related resources such as stylesheets or javascripts should be linked in the html source of the page, like in the following example. Note that the particular syntax may vary based on your SEO/SEF settings.
<link rel="stylesheet" href="/contact-us/loader/component/103/media/bootstrap/css" type="text/css" />
<script src="/contact-us/loader/component/103/components/jtext/js" type="text/javascript"></script>
Under some circumstances the resources are not present in the html source, or are corrupted / unreachable.

Background
Resources optimization concerns templates or plugins which combine external javascripts or stylesheets into one single file in order to minimize http requests and consequently improve the loading performances.
The related authors sometimes refer to their programs as "Resource compression" or "Resource combination".

Common causes
Fox Contact uses dynamically generated resources, which need to be loaded through its own loader and can't be handled as static plain-text javascript or stylesheets.

Solution
You have (at best) 3 different choices, but don't be surprised if one (or even all) of them doesn't work and Fox Contact dynamic resources continue to be corrupted.
  1. If your plugin / template offers a way to disable its compression features based on the resource name or based on the active menu item, you should be able to identify and exclude Fox Contact related resources or menu items, and optimize the rest of your website.
  2. Fox Contact can try to bypass combination tools. Go to "Components" > "Fox Contact", then press the "Options" button in the top bar. Here go to "Troubleshoot" section and set "Resources loading" to "Optimize for compatibility". This will move Fox Contact related resources (including css) to the bottom of the <head> section which may slightly slow down the page loading , but it should avoid most of the optimization extensions.
  3. Your plugin / template should offer a way to completely disable its compression features.

Below there is a list of known optimization extensions and templates which may conflict with Fox Contact when not properly set.

js / css combination extensions
JCH Optimize, ScriptMerge, jbetolo.

Templates with js / css combination features
YOOtheme, JoomlaShine, Themexpert

Please Log in or Create an account to join the conversation.