User Tools

Site Tools


admin_menu:design:settings:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
admin_menu:design:settings:start [2014/02/11 11:41]
geojames [Also Combine CSS and JS libraries]
admin_menu:design:settings:start [2014/12/16 17:27] (current)
geojames
Line 7: Line 7:
  
 The settings on this page control different aspects of how the design (templates, images, CSS, JS, etc.) work.  Care should be taken when changing these, if something is done incorrectly it can result in a non-working website.  Be sure to read the explanations for each of the settings below and you understand those explanations before changing the settings. The settings on this page control different aspects of how the design (templates, images, CSS, JS, etc.) work.  Care should be taken when changing these, if something is done incorrectly it can result in a non-working website.  Be sure to read the explanations for each of the settings below and you understand those explanations before changing the settings.
 +
 +====== How these features can help ======
 +
 +These features can speed page load for your site by reducing the footprint of css/js code downloaded to operate you site.  Many page analyzers recommend applying such features as mentioned here.  The features here are designed to do the following:
 +
 +**Combine js/css files** - This simply moves the contents of multiple files into a single file, to reduce the raw number of HTTP requests a visitor has to make for each page load.
 +
 +**Minimize those js/css files** - This further improves things by making that one combined file as small as possible (without actually applying "compression"). This process mostly removes unessential whitespace and replaces variable names with shorter counterparts.
 +
 +**Compression of those files** - This is a mathematical, binary-level process used to make text files smaller for transmission. It's akin to "zipping" the files before sending them to the browser, which then "unzips" them on the fly.  That would be used to compress the js/css files further.
 +
 +Some or all of these may not work on certain servers. Where they work, they'll generally make things faster, so if you can use all of them, great; however, if any of the options don't work for your particular server configuration, the best answer is generally to not use the ones that don't work.
 +
  
 ====== Media Location Settings ====== ====== Media Location Settings ======
Line 81: Line 94:
 If turning this on breaks the site, the most common cause is file permissions.  Use FTP to CHMOD the "geo_templates/" folder to 755 and the "geo_templates/min.php" to 644.  This is necessary for most sites that use [[http://httpd.apache.org/docs/2.2/suexec.html|suexec]], such servers do NOT need to use CHMOD 777 to make a folder "writable", and doing so can actually cause server errors like this one. If turning this on breaks the site, the most common cause is file permissions.  Use FTP to CHMOD the "geo_templates/" folder to 755 and the "geo_templates/min.php" to 644.  This is necessary for most sites that use [[http://httpd.apache.org/docs/2.2/suexec.html|suexec]], such servers do NOT need to use CHMOD 777 to make a folder "writable", and doing so can actually cause server errors like this one.
  
 +Another less common cause:  Force using www or not using www, but the site URL is set to the wrong URL.  For instance, if your site "forces" using www by doing a re-direct from example.com to www.example.com.  Make sure if you have such a re-direct in place, that you have the correct URL set in the Site URL setting in **Site Setup > General Settings**.  If this is set wrong, when it tries to combine the CSS and JS it might try to get the contents, only to be re-directed, and on some servers instead of just getting the re-directed content, it gets the "error page" content.  This is not as common but just make sure, if you have a re-direct set up from WWW to non-WWW or visa-versa, that your settings match the "correct" URL.
  
 +Similarly, an incorrect value for the Site Setup > General Settings > Site URL setting can cause problems (presents as the combined css/js files missing all content).
 ===== Clear Combined CSS & JS ===== ===== Clear Combined CSS & JS =====
 This button will appear if the main combine setting is enabled. This button will appear if the main combine setting is enabled.
Line 97: Line 112:
 If this causes problems, make sure you do NOT have the advanced setting **Use Google Libraries API** enabled.  The 2 settings in effect, cancel each other out because there is no need to use google libraries API if the library is going to be combined with the other JS on the page anyways.  And attempting to do so can cause problems((usually problems with timing out)) on some sites.  As of version 7.3.2 it is not possible to enable these settings at the same time because of this. If this causes problems, make sure you do NOT have the advanced setting **Use Google Libraries API** enabled.  The 2 settings in effect, cancel each other out because there is no need to use google libraries API if the library is going to be combined with the other JS on the page anyways.  And attempting to do so can cause problems((usually problems with timing out)) on some sites.  As of version 7.3.2 it is not possible to enable these settings at the same time because of this.
  
 +===== Trim repeated whitespace from final HTML output =====
 +
 +This option uses the Smarty template engine's "trimwhitespace" output filter to replace multiple blank characters in a row with a single space in the final HTML source sent to a visitor's browser. This very slightly **increases** the amount of time it takes the server to create each page, but the pages themselves may be significantly smaller, which could be advantageous if your site is frequented by mobile users or those on low-bandwidth connections.
 +
 +In our testing with the default template set, the HTML source took approximately 50ms longer to generate, but was approximately 25% (roughly 10 KB) smaller. Your results may vary greatly based on your server's hardware and performance factors, as well as the complexity of your templates.
 ===== Use Google Libraries API ===== ===== Use Google Libraries API =====
  
Line 165: Line 185:
 If enabled, will add lines to the .htaccess file that will tell browsers to cache static CSS / JS files for about a month.  This will help speed up page load times for repeat visitors to your site. If enabled, will add lines to the .htaccess file that will tell browsers to cache static CSS / JS files for about a month.  This will help speed up page load times for repeat visitors to your site.
  
-==== .htaccess - Use mod_rewrite for Combined CSS/JS ====+===== .htaccess - Use mod_rewrite for Combined CSS/JS =====
  
 Available when BOTH [[#Use .htaccess for geo_templates/]] AND [[#Combine, Minify, and Compress CSS and JS]] are enabled. Available when BOTH [[#Use .htaccess for geo_templates/]] AND [[#Combine, Minify, and Compress CSS and JS]] are enabled.
Line 187: Line 207:
 ==== Do NOT Automatically Include default.css in Combined CSS Contents ==== ==== Do NOT Automatically Include default.css in Combined CSS Contents ====
  
-Note: "Do NOT Automatically Include default.css in Combined CSS Contents" is the actual setting's name.+Note: "Do NOT Automatically Include default.css in Combined CSS Contents" is the actual setting's name((Just to make it clear, this is not a tip or something, there is an actual setting with that name that you can enable if you have a reason to keep it from loading the default.css file automatically.)).
  
 <tip c w>**Warning:**  Turning this on will **break your site** unless you are following this tutorial((TODO: Create said tutorial and link to it here)).  And as it mentions in the tutorial, using this option will make future software updates much more work.</tip> <tip c w>**Warning:**  Turning this on will **break your site** unless you are following this tutorial((TODO: Create said tutorial and link to it here)).  And as it mentions in the tutorial, using this option will make future software updates much more work.</tip>
admin_menu/design/settings/start.1392118896.txt.gz · Last modified: 2014/09/25 16:55 (external edit)