LSCache eklentisinin Newspaper teması özelinde olmak üzere genel güvenli ayarlarını aktarıyor olacağım. Ayarların ne işe yaradığının detaylarına çok girmeden bir kaç önemli noktadan bahsetmek istiyorum. Ayarların detaylı olarak ne işe yaradığını altlarındaki açıklamalardan veya internet üzerinden kolaylıkla bulabilirsiniz. Benim burada aktaracağım önemli nokta ise JQuery kullanan temalarda sorun yaşamamanız adına olan ayarlar olacaktır.

Burada karşımıza çıkan ilk nokta;

LiteSpeed (LSCache) Cache Page Optimization > JS Settings kısmındaki ayarlar olacak.

Bu kısımda JS Combine ve JS HTTP/2 Push kesinlikle kapalı olması gerekmekte. Bunların yanı sıra Exclude JQuery ayarımız ise kesinlikle açık olması gerekiyor. Burada aslına bakarsanız JS dosyalarını birleştirmedik ve JQuery kütüphanesini bu cache dışarısında bıraktık. Bu sayede temamızın özelliklerini bozulmadan kullanabilmekteyiz.

Tüm ayarları ayrıca vereceğim fakat şuan burada birkaç bilgi aktarmak istiyorum.

  • Lazzy Load: Kesinlikle açık olması gereken bir ayar. Dikkat etmeniz nokta ise başka bir lazzy load eklentisi kullanmıyor olmanız. Eğer iki adet lazyload işlemi yapmaya çalışan eklentiniz varsa bu işe yaramayacaktır.
  • WebP: Bir dikkat edilmesini tavsiye ettiğim husus ise site görsellerinizin WebP formatında yüklenmesi olacak arkadaşlar. Görsellerinizi webP formatına çevirmek için https://image.online-convert.com/convert-to-webp adresini kullanabilirsiniz. Ayrıca wordpress webp formatında dosyaları kabul etmeyeceğinden dolay temanızın functions.php dosyasında bazı değişiklikler yapmanız gerekiyor. Functions.php dosyasının en altına aşağıda vereceğim kodları yapıştırmalısınız.
    //** *Enable upload for webp image files.*/
    function webp_upload_mimes($existing_mimes) {
    $existing_mimes['webp'] = 'image/webp';
    return $existing_mimes;
    }
    add_filter('mime_types', 'webp_upload_mimes');
    //** * Enable preview / thumbnail for webp image files.*/
    function webp_is_displayable($result, $path) {
    if ($result === false) {
    $displayable_image_types = array( IMAGETYPE_WEBP );
    $info = @getimagesize( $path );if (empty($info)) {
    $result = false;
    } elseif (!in_array($info[2], $displayable_image_types)) {
    $result = false;
    } else {
    $result = true;
    }
    }return $result;
    }
    add_filter('file_is_displayable_image', 'webp_is_displayable', 10, 2);
  • Eğer ayarları newspaper teması için yapıyorsanız resimlerin bir de yüzde 50 çözünürlüğünde gelmesini isterseniz en alta şunu da ekleyebilirsiniz.
    add_filter( 'jpeg_quality', create_function('', 'return 50;' ) );
  • Ayrıca LSCache Cache Settings kısmında bulunan Browser Cache Settings kısmından browser cacheyi açmayı unutmayın.

Şimdi genel ayarları paylaşıyorum.

Şu yazıma da göz atmayı unutmayın: Jetpack site_inaccessible – Jetpack Kurulum Sorunu

Cache Control Settings

Enable Cache
Please visit the Information page on how to test the cache. NOTICE: When disabling the cache, all cached entries for this blog will be purged.
Cache Logged-in Users
Privately cache frontend pages for logged-in users. (LSWS v5.2.1+ required)
Cache Commenters
Privately cache commenters that have pending comments. Disabling this option will serve non-cacheable pages to commenters. (LSWS v5.2.1+ required)
Cache REST API
Cache requests made by WordPress REST API calls.
Cache Login Page
Disabling this option may negatively affect performance.
Cache favicon.ico
favicon.ico is requested on most pages. Caching this resource may improve server performance by avoiding unnecessary PHP calls.
⚠️ This setting will edit the .htaccess file.
Cache PHP Resources
Some themes and plugins add resources via a PHP request. Caching these pages may improve server performance by avoiding unnecessary PHP calls.
⚠️ This setting will edit the .htaccess file.
Cache Mobile
Cache mobile views separately. Only enable for AMP or mobile-specific design/content, not for responsive sites.
⚠️ This setting will edit the .htaccess file.

Browser Cache Settings

Browser Cache
Browser caching stores static files locally in the user’s browser. Turn on this setting to reduce repeated requests for static files.
⚠️ This setting will edit the .htaccess file.
You can turn on browser caching in server admin too. Learn more about LiteSpeed browser cache setting.
Browser Cache TTL  seconds = 52 weeks 1 day 6 hours

The amount of time, in seconds, that files will be stored in browser cache before expiring. Recommended value: 31557600
Value range: Larger than 30

CSS Settings

CSS Minify
Minify CSS files.
CSS Combine
CSS HTTP/2 Push
Pre-send internal CSS files to the browser before they are requested. (Requires the HTTP/2 protocol)
Load CSS Asynchronously
Optimize CSS delivery. This can improve your speed score in services like Pingdom, GTmetrix and PageSpeed.
When this option is turned ON, it will also load Google Fonts asynchronously.
API: Elements with attribute data-no-async="1" in html code will be excluded.
Generate Critical CSS
Leave this option ON to allow communication with QUIC.cloud CCSS service. If set to OFF, Critical CSS will not be generated.
This option only works if Load CSS Asynchronously is ON.
Generate Critical CSS In Background
Automatically generate critical CSS in the background via a cron-based queue. If set to OFF this is done in the foreground, which may slow down page load. Learn More

Last generated: 10m 13s ago

Last requested cost: 7s

 

Inline CSS Async Lib
This will inline the asynchronous CSS library to avoid render blocking.
Font Display Optimization
Set this to append font-display to all @font-face rules before caching CSS to specify how fonts should be displayed while being downloaded.
Swap is recommended.

JS Settings

JS Minify
Minify JS files.
JS Combine
JS HTTP/2 Push
Pre-send internal JS files to the browser before they are requested. (Requires the HTTP/2 protocol)
Load JS Deferred
Doing so can help reduce resource contention and improve performance. This can improve your speed score in services like Pingdom, GTmetrix and PageSpeed.
Load Inline JS
Load inline JS after DOM is fully loaded.
This can increase JS compatibility and reduce JS error when the previous JS optimization features are enabled.
Deferred is recommended.
Exclude JQuery
Improve compatibility with inline JS by preventing jQuery optimization. (Recommended Setting: ON)
⚠️ If there is any JS error related to jQuery when enabled JS Combine, please turn on this option.

Media Settings

Lazy Load Images
Load images only when they enter the viewport. This can improve page loading time by reducing initial HTTP requests.
💡: Adding Style to Your Lazy-Loaded Images
Responsive Placeholder
Responsive image placeholders can help to reduce layout reshuffle when images are loaded. This will generate the placeholder with same dimensions as the image if it has the width and height attributes.
Responsive Placeholder SVG
Specify an SVG to be used as a placeholder when generating locally. It will be converted to a base64 SVG placeholder on-the-fly.
Variables {width} {height} will be replaced with the corresponding image properties.
Variables {color} will be replaced with the configured background color.
Recommended value: <svg xmlns="http://www.w3.org/2000/svg" width="{width}" height="{height}" viewBox="0 0 {width} {height}"><rect width="100%" height="100%" fill="{color}"/></svg>
Responsive Placeholder Color

Specify the responsive placeholder SVG color. Recommended value: #cfd4db
LQIP Cloud Generator
Use QUIC.cloud LQIP (Low Quality Image Placeholder) generator service for responsive image previews while loading.
Keep this off to use plain color placeholders. Learn More
LQIP Quality

Specify the quality when generating LQIP.
Larger numbers will generate higher resolution quality placeholder, but will result in larger files which will increase page size and consume more points. Recommended value: 4
Value range: 1 - 20
LQIP Minimum Dimensions  x  pixels

LQIP requests will not be sent for images where both width and height are smaller than these dimensions. Recommended value: 150
Value range: 10 - 800
Value range: 10 - 800
Generate LQIP In Background
Automatically generate LQIP in the background via a cron-based queue. If set to ON, before the placeholder is localized, the Responsive Placeholder SVG configuration will be used. If set to OFF this is done in the foreground, which may slow down page load. Learn More
Lazy Load Iframes
Load iframes only when they enter the viewport. This can improve page loading time by reducing initial HTTP requests.
Inline Lazy Load Images Library
Include the lazy load image Javascript library inline. This can improve your speed score in services like Pingdom, GTmetrix and PageSpeed. Learn More

Şimdilik yazacaklarım bu kadar. Umarım faydalı olmuştur.

Advertisement
Önceki İçerikGeomatik Mühendisliği nedir, ne iş yapar?
Sonraki İçerikJava Dersleri: Mini Mayın Tarlası Oyunu
Abone Ol
Bildirim Al
guest

Bu site, istenmeyenleri azaltmak için Akismet kullanıyor. Yorum verilerinizin nasıl işlendiği hakkında daha fazla bilgi edinin.

0 Yorum
Satıriçi Geribildirimi
Tüm yorumları göster.