Changes

m
no edit summary
Line 53: Line 53:     
Principle: You can setup apache to activate explicit cache of static resources by adding following directives:
 
Principle: You can setup apache to activate explicit cache of static resources by adding following directives:
<source lang="ini">
+
<syntaxHighlight lang="ini">
 
# Cache for static resources (Enable expiration and set it to A2592000 = 1 month)
 
# Cache for static resources (Enable expiration and set it to A2592000 = 1 month)
 
ExpiresActive On
 
ExpiresActive On
Line 64: Line 64:  
ExpiresByType application/x-javascript A2592000
 
ExpiresByType application/x-javascript A2592000
 
ExpiresByType application/javascript A2592000
 
ExpiresByType application/javascript A2592000
</source>
+
</syntaxHighlight>
 
Again, gain is cumulative with other previous caches.
 
Again, gain is cumulative with other previous caches.
   Line 73: Line 73:     
Principle: You can setup apache to activate compression of returned resources by adding following directives:
 
Principle: You can setup apache to activate compression of returned resources by adding following directives:
<source lang="ini">
+
<syntaxHighlight lang="ini">
 
# Compress returned resources of type php pages, text file export, css and javascript
 
# Compress returned resources of type php pages, text file export, css and javascript
 
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/x-javascript
 
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/x-javascript
</source>
+
</syntaxHighlight>
 
[[File:warning.png]] After adding this, you must reload web server setup but also clear local cache browser to force browser to ask full file again and get new header.
 
[[File:warning.png]] After adding this, you must reload web server setup but also clear local cache browser to force browser to ask full file again and get new header.
   Line 83: Line 83:     
Principle: If you use a mysql database, check into your Dolibarr config file htdocs/conf/conf.php that you have the line
 
Principle: If you use a mysql database, check into your Dolibarr config file htdocs/conf/conf.php that you have the line
<source lang="php">
+
<syntaxHighlight lang="php">
 
$dolibarr_main_db_type='mysqli';
 
$dolibarr_main_db_type='mysqli';
</source>
+
</syntaxHighlight>
 
If value is '''mysql''', change it into '''mysqli''' that provide better performances (gain is 30ms for each page call).
 
If value is '''mysql''', change it into '''mysqli''' that provide better performances (gain is 30ms for each page call).