क्रिश्चियन शॉ
  • होम
  • Blog
    • प्रोग्रामिंग
      • C#
      • पॉवरशेल
      • Python
      • SQL
    • वर्डप्रेस
      • ट्युटोरियल
    • क्लाउड
    • होम ऑटोमेशन
      • होम असिस्टेंट
        • Node-Red
    • Career
  • सेवाएं
  • शब्दकोष
  • About
No Result
View All Result
क्रिश्चियन शॉ
  • होम
  • Blog
    • प्रोग्रामिंग
      • C#
      • पॉवरशेल
      • Python
      • SQL
    • वर्डप्रेस
      • ट्युटोरियल
    • क्लाउड
    • होम ऑटोमेशन
      • होम असिस्टेंट
        • Node-Red
    • Career
  • सेवाएं
  • शब्दकोष
  • About
No Result
View All Result
क्रिश्चियन शॉ
No Result
View All Result
Home वर्डप्रेस ट्युटोरियल
वर्डप्रेस CSS डिलीवरी का अनुकूलन करें

वर्डप्रेस CSS डिलीवरी का अनुकूलन करें

by ईसाई
2022-18-फ़रवरी
in ट्युटोरियल
0

I recently came across a user who asked me if it was possible to optimize WordPress CSS Delivery easily – the short answer is YES. For a long time I wanted to get back into the tech-writing so this will be my starting point.

CSS के लिए संक्षिप्त परिचय

वर्डप्रेस या आम तौर पर किसी भी अन्य वेबसाइट में सीएसएस फाइलें वेबसाइट के दृश्य स्वरूपण और शैली को नियंत्रित करती हैं। यदि आपका CSS बेहतर तरीके से वितरित नहीं किया गया है, तो यह सुनिश्चित करने के लिए आपकी वेबसाइट को धीमा कर देगा।

इस लेख में (लिंक्डइन पर मेरा पहला लेख) मैं आपको दिखाऊंगा कि वर्डप्रेस वेबसाइटों पर सीएसएस डिलीवरी को आसानी से कैसे अनुकूलित किया जाए।

How slow delivery of CSS files affects the performance of your WordPress website

CSS files are used to define how the visuals of a website are showing up on your visitor’s device. Your WordPress theme contains a CSS stylesheet file and some of your plugins might also use CSS stylesheets if they are showing content in the frontend.

CSS is necessary for modern websites. Most of your visitors don’t think about them and they have also become a central part of almost every website on the internet. The bad side of CSS files is that they can potentially slow down your website (depending on how they are set up).

Even small delays on a website give the user a bad experience and it may also affect your rankings in search engines like Google, Bing, etc…

One of the primary reasons that a CSS file wills low down your WordPress website is due to the way they are loaded. If the CSS file needs to be loaded before the page, your visitors would just see a blank page until the CSS has loaded. This is also known as render-blocking CSS.

Another common problem is that the CSS file contains a lot of “garbage” (code that is not needed to display the current page). Extra code = Extra loading time for your visitor = bad experience, which may lead to a lost lead.

The good news for those with a slow site due to CSS delivery issues is that you can change the way how your CSS is delivered for the user.

The way you can accomplish this is by identifying the minimum CSS code needed to display the very first part of your website. In a technical talk, this is known as “Critical CSS“. The critical CSS can be added inline to the page’s HTML, instead of adding it to the CSS files. The result is a page rendered without the need to load the CSS file before the content.

While the page has been loaded, you can continue to load the rest of the CSS for the user. In a technical talk, this would be known as “Deferred Loading“. In the tutorial below I will show you how to accomplish this using two plugins for WordPress.

WP Rocket – My preferred Cache Plugin for WordPress

My opinion is that WP Rocket is by far the best WordPress Caching Plugin on the WordPress Plugin market. It gives you a simple, nice, and easy way to optimize WordPress. The CSS part is as easy as checking a box – Done…

WP Rocket is a premium plugin. The price is $49 for 1 year of support and updates – that’s only around $0,14 each day for running a perfectly optimized WordPress website – what’s not to like?!

The first thing you have to do is install WP Rocket in WordPress. Buy a subscription, download the plugin and activate it. Once activated, navigate to Settings » WP Rocket and click the tab “File Optimization” and finish up by clicking Save.

Scroll to the CSS file section. Here you have to check the box “Optimize CSS Delivery” to optimize the CSS delivery on your website. This will as I mentioned earlier stop render-blocking of CSS in return for faster loading on your WordPress website.

WP Rocket will take care of the rest. Lean back and watch how intelligently WP Rocket will identify Critical CSS that your visitors will see as the first part of your website. Once the Critical CSS has been generated, try and load your website in a browser that has no user signed into the WordPress admin area.

WP Rocket will automatically clear the cache on your website so that you new visitors will see an optimized version instead of the old unoptimized version of your website. Once you explore WP Rocket you will find out that there are plenty of other ways that WP Rocket can help you improve the performance of your website.

Autoptimize (FREE) – How to optimize CSS Delivery

Autoptimize is a free WordPress plugin developed by Frank Goossens to improve the performance of your WordPress website by optimizing CSS and JS files.

While it’s a free option to improve performance, Autoptimze lacks a lot of the features WP Rocket offers and takes some more time up for the configuration.

It’s not able to automatically identify the critical CSS parts as you saw in WP Rocket. Instead, you need to buy this from a third-party developer, which of course comes with an additional cost.

However, Autoptimize is a good choice if your budget is tight and you don’t need all the many features WP Rocket offers to speed up the website.

Go ahead and install Autoptimize in WordPress and activate it. Once activated, go to Settings » Autoptimize to configure the plugin. Once at the page for configuration of Autoptimize, scroll to the CSS section and do the following:

  • Check Optimize CSS Code?
  • Uncheck Aggregate CSS-files?
  • Check Eliminate render-blocking CSS?

Scroll to the bottom and click Save Changes and Empty Cache. This will store your newly selected settings.

Autoptimize won’t work properly before you sign up for a subscription at https://criticalcss.com/ – this will give you access to the generation of Critical CSS. To get access to this service, you can navigate to the Critical CSS tab in the settings for Autoptimize. Here you will find all the necessary details to get started.

Once you register and get access to your API key, scroll to the API Key section in Autoptimze and paste it into the text box. After that, click the button Save Changes.

Autoptimze now got all the details it needs to add critical CSS inline and help you defer loading the stylesheets until the website has been fully rendered. The result = A WordPress website that loads more quickly.

Previous Post

What is Docker? Docker beginner guide

Next Post

How to use FluentValidation in ASP.NET Core (.NET 6)

ईसाई

ईसाई

Hello 👋 My name is Christian and I am 26 years old. I'm an educated Software Developer with a primary focus on C#, .NET Core, Python, and PowerShell. Currently, I'm expanding my skills in Software Robots and Cloud Architecture. In some of my spare time, I share my knowledge about tech stuff on my blog.

Related Posts

No Content Available
Next Post
FluentValidation

How to use FluentValidation in ASP.NET Core (.NET 6)

क्रिश्चियन शॉ

क्रिश्चियन शॉ

Software Developer

Hello - my name is Christian and I am 26 years old. I'm an educated Software Developer with a primary focus on C#, .NET Core, Python, and PowerShell. Currently, I'm expanding my skills in Software Robots and Cloud Architecture. In some of my spare time, I share my knowledge about tech stuff on my blog.

Recent articles

personal website
Career

Top 6 things to add on your personal website to get hired for a tech job

by ईसाई
2022-7-अगस्त
0

Back in the days before the internet was a thing like it is today, we used to have business cards...

Read more
watchdog

The #1 guide to show real-time .NET 6 logs for Web Apps and APIs in a modern way using WatchDog for Free

2022-13-अगस्त
get hired for a tech job

5 tips to help you get hired for a tech job

2022-31-जुलाई
restful web api

How to build a RESTful Web API using ASP.NET Core and Entity Framework Core (.NET 6)

2022-25-जुलाई
dynamically register entities

How to Dynamically Register Entities in DbContext by Extending ModelBuilder?

2022-23-जुलाई

क्रिश्चियन शॉ

Software Developer

Hello - my name is Christian and I am 26 years old. I'm an educated Software Developer with a primary focus on C#, .NET Core, Python, and PowerShell. Currently, I'm expanding my skills in Software Robots and Cloud Architecture. In some of my spare time, I share my knowledge about tech stuff on my blog.

Recent articles

personal website

Top 6 things to add on your personal website to get hired for a tech job

2022-7-अगस्त
watchdog

The #1 guide to show real-time .NET 6 logs for Web Apps and APIs in a modern way using WatchDog for Free

2022-13-अगस्त
get hired for a tech job

5 tips to help you get hired for a tech job

2022-31-जुलाई
  • hi_INहिन्दी
    • da_DKDansk
    • en_USEnglish
    • de_DEDeutsch
    • pt_BRPortuguês do Brasil
  • Contact
  • गोपनीयता नीति
  • सेवा की शर्तें

© 2022 क्रिश्चियन शॉ - All rights reserved.

No Result
View All Result
  • होम
  • Blog
    • प्रोग्रामिंग
      • C#
      • पॉवरशेल
      • Python
      • SQL
    • वर्डप्रेस
      • ट्युटोरियल
    • क्लाउड
    • होम ऑटोमेशन
      • होम असिस्टेंट
    • Career
  • सेवाएं
  • शब्दकोष
  • About

© 2022 क्रिश्चियन शॉ - All rights reserved.

मैं आपकी वरीयताओं को याद करके और बार-बार आने वाली यात्राओं को याद करके आपको सबसे अधिक प्रासंगिक अनुभव देने के लिए अपनी वेबसाइट पर कुकीज़ का उपयोग करता हूं। “स्वीकार करें” पर क्लिक करके, आप सभी कुकीज़ के उपयोग के लिए सहमति देते हैं।
मेरी निजी जानकारी न बेचें.
कुकी सेटिंगACCEPT
गोपनीयता और कुकीज़ नीति

गोपनीयता अवलोकन

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
CookieDurationDescription
__gads1 year 24 daysThe __gads cookie, set by Google, is stored under DoubleClick domain and tracks the number of times users see an advert, measures the success of the campaign and calculates its revenue. This cookie can only be read from the domain they are set on and will not track any data while browsing through other sites.
_ga2 yearsThe _ga cookie, installed by Google Analytics, calculates visitor, session and campaign data and also keeps track of site usage for the site's analytics report. The cookie stores information anonymously and assigns a randomly generated number to recognize unique visitors.
_ga_0J2F6JVWSD2 yearsThis cookie is installed by Google Analytics.
_gat_gtag_UA_84232734_11 minuteSet by Google to distinguish users.
_gid1 dayInstalled by Google Analytics, _gid cookie stores information on how visitors use a website, while also creating an analytics report of the website's performance. Some of the data that are collected include the number of visitors, their source, and the pages they visit anonymously.
YouTube2 yearsYouTube sets this cookie via embedded youtube-videos and registers anonymous statistical data. I embed YouTube videos in my articles/tutorials - you won't get the full experience of the articles if this is deactivated.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
CookieDurationDescription
IDE1 year 24 daysGoogle DoubleClick IDE cookies are used to store information about how the user uses the website to present them with relevant ads and according to the user profile.
test_cookie15 minutesThe test_cookie is set by doubleclick.net and is used to determine if the user's browser supports cookies.
VISITOR_INFO1_LIVE5 months 27 daysA cookie set by YouTube to measure bandwidth that determines whether the user gets the new or old player interface.
YSCsessionYSC cookie is set by Youtube and is used to track the views of embedded videos on Youtube pages.
yt-remote-connected-devicesneverYouTube sets this cookie to store the video preferences of the user using embedded YouTube video.
yt-remote-device-idneverYouTube sets this cookie to store the video preferences of the user using embedded YouTube video.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT
Powered by CookieYes Logo