website Optimization

Some of you may have aldready known this but some have not, such as new drupalers.

Anyway lets's start talking about site performance. Have you ever checked your drupal site's source page? If not check it right now....
 Right Click on the web site and choose view page source.

Don't be shocked by the number of external styles and script files in the headr tag, it's common in every drupal site, but you may have noticed that whenever you add a new module the scripts and styles are keep increasing, that's not good for our site and bandwidth, especially it will affect your SEO because google penalize slow site. Don't worry Drupal gives us an option to solve this issue. Go to Administer>Site configuration>Performance and configure it as below;

[1] Caching Mode: Normal

[2] Minimum Cache Lifeime: none (Set it depends on your site traffic and content upadtes)

[3] Page Compression: Enabled

[4] Block Cache: Enabled

[5] Optimize CSS files: Enabled

[6] Optimize JavaScript Files: Enabled

Now you click the save configuration button and go to your site's front page and check the source code again...

Did you notice a big difference there? all the CSS files are now in one css file and same for the javaScript files too.

When you enabled this CSS and JavaScript files it automatically created two files named CSS and JS in your sites/all/deafult/files directory for separately saving the optimized CSS and JavaScript files from the themes folder.

If you ever made a changes to your sites styles or any other settings after enabling the cache make sure that you clear the cache to see the result.

By enabling the cache and optimizing the external styles and scripts you have done a big optimizaion to your drupal web site. Hope this small tip could help to improve your sites performance. If you have any questions regarding your sites performance comment below, I will try my best to reply as fast as I can.