Website တစ်ခုရဲ့ အမြန်နှုံးဟာ အဲဒီဆိုက်နဲ့ ပတ်သက်နေတဲ့ Webmaster, Website Owner နဲ့ Website Visitor များနဲ့ အများကြီး ဆက်စပ် သက်ဆိုင်နေပါတယ်။ အင်တာနက်ရဲ့ အရေးပါတဲ့ နည်းပညာတစ်ခုဖြစ်တဲ့ Web Performance Optimization မှာ အဓိကကျတဲ့ အချက်တစ်ခု ဖြစ်တဲ့ GZip Compression အကြောင်း အခြေခံသဘောတရားများနဲ့ Webmaster တစ်ယောက်အနေနဲ့ Server ကို Configuration လုပ်နိုင်တဲ့ နည်းလမ်းများ အကြောင်းကို လေ့လာခဲ့ကြပြီးပါပြီ။ အခုဆက်ပြီး WordPress, Joomla, Drupal တို့နဲ့ တည်ဆောက်ထားတဲ့ Webite တွေမှာ အလွယ်တကူ GZip ဘယ်လိုလုပ်ကြမလဲ ဆိုတာနဲ့ Caching ဘယ်လိုလုပ်ကြမလဲ ဆိုတာ လေ့လာကြည့်ကြရအောင်။
အခု သုံးမယ့်နည်းလမ်းတွေမှာ ကျွန်တော်တို့အနေနဲ့ HTACCESS ဖိုင်ကို ပြင်ဆင်ရတာမျိုး လုပ်မှာ မဟုတ်ပါဘူး။ php ကနေ GZip Compression လုပ်တဲ့ နည်းကို အသုံးပြုကြမှာပါ။ အဲဒီအတွက် ပထမဆုံး Web Server ရဲ့ PHP Setting ကို စစ်ဆေးကြည့်ဖို့ လိုအပ်ပါမယ်။ အလွယ်ဆုံးနည်းကတော့ အောက်မှာဖော်ပြထားတဲ့ PHP Code လေးကို Notepad ထဲမှာ ရေးပြီး ဖိုင်ကို info.php အဖြစ် သိမ်းပါ။ ပြီးတော့ Domain ရဲ့ www (သို့မဟုတ် public_html) folder ထဲကို FTP ကတစ်ဆင့် ထည့်သွင်းပါ။
<?php phpinfo( ); ?>
ပြီးတော့ http://www.yourdomain.com/info.php ကတစ်ဆင့် အဲဒီဖိုင်ကို ပြန်ခေါ်ကြည့်ပါ။
WordPress Site တွေအတွက် - WordPress phpinfo() plugin ဒါမှမဟုတ် WP-ServerInfo plugin ကို Install လုပ်ပြီး ကြည့်နိုင်ပါတယ်။ Joomla Site တွေမှာဆိုရင်တော့ Joomla ရဲ့ Backend ထဲက Help --> PHP Information ထဲကနေ Server ရဲ့ PHP Information ကို ကြည့်နိုင်ပါတယ်။ Drupal site တွေမှာဆိုရင်တော့ Site Admin အနေနဲ့ http://www.yourdomain.com/admin/reports/status/php ကတစ်ဆင့် အလွယ်တကူ ခေါ်ကြည့်လို့ ရပါတယ်။ ရလာတဲ့ PHP Info တွေထဲမှာ ZLib Support - enabled ဖြစ်မဖြစ် ကြည့်ပါ။ Enabled ဖြစ်နေခဲ့ရင် ရှေ့ဆက်လို့ ရပါပြီ။
WordPress Engine ကို အသုံးပြုထားတဲ့ ၀က်ဘ်ဆိုက်တွေမှာ GZip Compression လုပ်နည်းတွေကို လေ့လာကြရအောင်။
WordPress ဆိုက်တစ်ခုကို GZip (Caching, Minify စသည့် အခြား နည်းစနစ်များ အပါအ၀င်) လုပ်ဖို့အတွက် အကောင်းဆုံး နည်းလမ်းတစ်ခုကတော့ W3 Total Cache Plugin ကို အသုံးပြုခြင်းပါပဲ။ ဒီ Plugin ဟာ WordPress ဆိုက်တစ်ခုရဲ့ အမြန်နှုံးနဲ့ User များရဲ့ သုံးစွဲမှု အတွေ့အကြုံ (User Experience) ကို ပိုပြီး တိုးတက်ကောင်းမွန်စေဖို့ ဖန်တီးပေးနိုင်ပါတယ်။ လက်ရှိ အချိန်မှာ နာမည်ကြီး ၀က်ဘ်ဆိုက်တွေ ဖြစ်တဲ့ mashable.com, smashingmagazine.com, makeuseof.com, kiss925.com, pearsonified.com, lockergnome.com, tutsplus.com, johnchow.com, ilovetypography.com, webdesignerdepot.com, css-tricks.com နဲ့ yoast.com အပါအ၀င် WordPress ကို အသုံးပြုထားတဲ့ Website များစွာမှာ အသုံးပြုထားပါတယ်။ ဒီဆောင်းပါးရေးတဲ့ အချိန် (2010-08-29) မှာ User Ratings 507 ratings နဲ့ 116,586 Downloads ရရှိထားပါတယ်။ W3 Total Cache ရဲ့ Feature အပြည့်အစုံနဲ့ Configuration နည်းလမ်းတွေကို မူရင်း Plugin Site မှာ လေ့လာနိုင်ပါတယ်။
ဒီ Plugin ကတော့ WordPress ဆိုက်တစ်ခုကို GZip သီးသန့်လုပ်ပေးတဲ့ Plugin ပါ။ Plugin ကို Install လုပ်ပြီး Enable လုပ်လိုက်တာနဲ့ WordPress site ကို GZip လုပ်ပြီးသား ဖြစ်ပါပြီ။ GZippy from WordPress
WordPress Plugin တွေကို တစ်ခါတရံမှာ functions.php ထဲမှာ ပြောင်းရေးလို့ ရပါတယ်။ တကယ်လို့ GZippy ကို Plugin အဖြစ် မသုံးချင်ဘူးဆိုရင်တော့ အောက်မှာ ဖော်ပြထားတဲ့ function လေးကို လက်ရှိ အသုံးပြုနေတဲ့ WordPress Theme ထဲက functions.php ဖိုင်ထဲမှာ သွားရေး ပေးရပါမယ်။ အခုလို functions.php မှာ ရေးမယ်ဆိုရင်တော့ GZippy plugin ကို သုံးဖို့ မလိုအပ်တော့ပါဘူး။ အဲဒီ Plugin ကို Install လုပ်ထားခဲ့ရင် ပြန်ဖြုတ်ပြီးမှ ရေးဖို့ လိုပါလိမ့်မယ်။
function gzippy() { ob_start('ob_gzhandler'); }
if(!stristr($_SERVER['REQUEST_URI'], 'tinymce') && !ini_get('zlib.output_compression')) {
add_action('init', 'gzippy');
}(Plugin များနဲ့ functions.php တို့ကြားမှာ နှိုင်းယှဉ်စရာ အားနည်းချက် အားသာချက်တွေ အများကြီးရှိလို့ ဒီဆောင်းပါးမှာတော့ အသေးစိတ် မဆွေးနွေးတော့ပါဘူး။ Google မှာ ရှာကြည့်လို့ ရပါတယ်။)
ဒီလောက်ဆိုရင်တော့ WordPress ၀က်ဘ်ဆိုက်တစ်ခုကို GZip လုပ်နိုင်ဖို့ လိုအပ်ချက်လေးတွေ ပြည့်စုံပါပြီ။
GZip Compression ဟာ Joomla Engine မှာ Built in ပါပြီးသား ဖြစ်ပါတယ်။ ကျွန်တော်က Joomla ကို တစ်ကြိမ်မျှ မစမ်းကြည့်ဖူးသေးတဲ့ အတွက် ဒီနည်းကို လက်တွေ့ မစမ်းရသေးပါဘူး။ ဒါပေမယ့် Joomla.org ရဲ့ Forum ထဲမှာ ရေးသားဖော်ပြထားချက်များအရ GZip Compression ကို Admin Panel ထဲက
Global Configuration > Server > Server Settings > GZIP Page Compression
မှာ ပြုလုပ်ပေးရပါမယ်။
တကယ်လို့ Cache Setting ကိုလည်း ပြင်ဆင်ချင်တယ်ဆိုရင်တော့
Global Configuration > System > Cache Settings > Cache
မှာ သတ်မှတ်ပေးရပါလိမ့်မယ်။
(Source - How to Gzip Joomla? from Joomla.org Forum)

Drupal Engine မှာ Built in GZip Compression စနစ် ပါပြီးသားပါ။ Drupal ကို သုံးထားတဲ့ ၀က်ဘ်ဆိုက်များ အနေနဲ့ GZip လုပ်ဖို့အတွက် Site Administrator အနေနဲ့ http://www.yourdomain.com/admin/settings/performance မှာ Page compression: ကို Enable လုပ်ပေးရပါမယ်။
Drupal Engine မှာ Performance ကောင်းစေဖို့အတွက် Built in Caching Sytem လည်းပါပြီးသား ဖြစ်ပါတယ်။ အဲဒီအတွက်ကြောင့် Drupal Site တစ်ခုကို Login မ၀င်ဘဲ ဒီအတိုင်းကြည့်နေတဲ့ Visitor တစ်ယောက် အတွက် Site Administrator က သတ်မှတ်ထားတဲ့ Cache Setting အတိုင်း ဆိုက်ကို မြင်နေရမှာ ဖြစ်ပါတယ်။ Drupal Site တစ်ခုရဲ့ Block တွေနဲ့ Views Module ရဲ့ Setting တွေမှာ Cache ကို 6 ရက်အထိ အများဆုံး Caching လုပ်ခိုင်းထားလို့ ရပါတယ်။ Drupal Site တစ်ခုရဲ့ Cache Setting ကိုလည်း GZip လုပ်တဲ့ နေရာမှာပဲ သတ်မှတ်ပေးရတာ ဖြစ်ပါတယ်။ စိတ်ကြိုက် ပြင်ဆင်ပြီးတဲ့ အခါမှာ Save Configuration ကို နှိပ်ပေးရပါမယ်။ အပေါ်ပုံမှာ နမူနာအဖြစ် ကြည့်နိုင်ပါတယ်။
Website တစ်ခုရဲ့ အမြန်နှုံးဟာ အဲဒီဆိုက်နဲ့ ပတ်သက်နေတဲ့ Webmaster, Website Owner နဲ့ Website Visitor များနဲ့ အများကြီး ဆက်စပ် သက်ဆိုင်နေပါတယ်။ အခြေခံအကျဆုံး သဘောတရားကတော့ “မြန်လေကောင်းလေ” လို့ ပြောနိုင်မယ် ထင်ပါတယ်။ ကန့်သတ်ချက်များစွာ ကြုံတွေ့ရနိုင်တဲ့ Web Development Process တစ်ခုမှာ Performance Optimization ဟာ Webmaster တစ်ယောက်အတွက်တော့ စိန်ခေါ်မှု တစ်ရပ်ပါ။ အခု ရေးသားဆွေးနွေးခဲ့တဲ့ အကြောင်းအရာများဟာ Web Development Process များမှာ နည်းလမ်းအမျိုးမျိုး အကြောင်း အမျိုးမျိုးနဲ့ သက်ဆိုင်နေရတဲ့ မြန်မာ ညီအကို မောင်နှမ မိတ်ဆွေ သူငယ်ချင်းများ အနေနဲ့ တစ်နည်းတစ်ဖုံ အထောက်အကူ ရလိမ့်မယ်လို့ မျှော်လင့်ပါတယ်။
လူတိုင်းမှာ ပြီးပြည့်စုံတယ်ဆိုတာ မရှိတဲ့ အတွက် ဒီရေးသားချက်များမှာ အမှားအယွင်းပါရှိခဲ့ရင် အမှန်သိရှိသူများက ပြင်ဆင် တည့်မတ်ပေးသွားဖို့ ဖိတ်ခေါ်ပါတယ်။
Finding Server Info from WordPress Codex
WP-ServerInfo Plugin from WordPress.org
Joomla PHP Info from Joomla.org
Add new comment