GithubHelp home page GithubHelp logo

erntrgt / front-end-performance-checklist Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thedaviddias/front-end-performance-checklist

0.0 0.0 0.0 367 KB

🎮 The only Front-End Performance Checklist that runs faster than the others

License: MIT License

front-end-performance-checklist's Introduction


Front-End Performance Checklist

  Front-End Performans Kontrol Listesi  


🚨 Şu anda frontendchecklist.io'nun yeni sürümü üzerinde çalışılıyor
(mevcut performansı içerecektir).
Görmek istediğiniz herhangi bir özelliği belirtmekten lütfen çekinmeyin. Desteğiniz için teşekkürler!


🎮 Diğerlerinden daha hızlı çalışan tek Front-End Performans Kontrol Listesi

Basit bir kural: "Performansı göz önünde bulundurarak tasarlayın ve kodlayın"

      PRs Welcome         Discord           Licence MIT  

  Nasıl Kullanılır?Katkıda BulununÜrün Avı

🇨🇳 🇫🇷 🇰🇷 🇵🇹 🇷🇺 🇯🇵 🇮🇷 🇹🇷

Diğer Kontrol Listeleri:
🗂 Front-End Kontrol Listesi • 💎 Front-End Dizayn Kontrol Listesi

Giriş

Performans çok büyük bir konudur, ancak her zaman bir "back-end" veya "yönetici" konusu değildir, aynı zamanda bir Front-End sorumluluğudur. Front-End Performans Kontrol Listesi, bir Front-End geliştiricisi olarak kontrol etmeniz veya en azından farkında olmanız ve projenize (kişisel veya profesyonel) uygulamanız gereken unsurların kapsamlı bir listesidir.

Nasıl Kullanılır?

Her kural için, bu kuralın neden önemli olduğunu ve sorunu nasıl düzeltebileceğinizi açıklayan bir paragrafınız olacak. Daha derin bilgi için, kontrol listesini tamamlayabilecek 🛠 araçlara, 📖 makalelere veya 📹 medyalara işaret edecek bağlantılar bulabilirsiniz.

Front-End Performans Kontrol Listesindeki tüm öğeler, en yüksek performans puanına ulaşmak için gereklidir, ancak kontrol listesindeki bazı kuralların diğerlerine göre öncelik sıralamasını belirttiğimiz bir gösterge bulacaksınız.3 öncelik düzeyi bulunmaktadır:

  • Low öğenin düşük önceliğe sahip olduğu anlamına gelir.
  • Medium öğenin orta düzeyde önceliğe sahip olduğu anlamına gelir. Bu öğeyi ele almaktan kaçınmamalısınız.
  • High öğenin yüksek önceliğe sahip olduğu anlamına gelir. Bu kurala uymaktan ve önerilen düzeltmeleri uygulamaktan kaçınamazsınız.

Performans Araçları

Web sitenizi veya uygulamanızı test etmek ya da izlemek için kullanabileceğiniz araçların listesi:

Referanslar


HTML

html

  • Minimize Edilmiş HTML: medium HTML kodu minimize edilir (küçültülür), yorumlar, beyaz boşluklar ve yeni satırlar üretim dosyalarından kaldırılır.

    Neden:

    Gereksiz tüm boşlukları, yorumları ve nitelikleri kaldırmak HTML'nizin boyutunu azaltacak ve sitenizin sayfa yükleme sürelerini hızlandıracak ve tabii ki kullanıcılarınız için indirme işlemini hafifletecektir.

    Nasıl:

    Framework'lerin çoğu, web sayfalarının küçültülmesini kolaylaştırmak için eklentilere sahiptir. Bu işi sizin için otomatik olarak yapabilecek bir grup NPM modülü kullanabilirsiniz.

  • CSS etiketlerini her zaman JavaScript etiketlerinden önce yerleştirin: high CSS'nizin her zaman JavaScript kodundan önce yüklendiğinden emin olun.

    <!-- Tavsiye Edilmeyen -->
    <script src="jquery.js"></script>
    <script src="foo.js"></script>
    <link rel="stylesheet" href="foo.css" />
    
    <!-- Tavsiye Edilen -->
    <link rel="stylesheet" href="foo.css" />
    <script src="jquery.js"></script>
    <script src="foo.js"></script>

    Neden:

    CSS etiketlerinizin herhangi bir JavaScript'ten önce olması, tarayıcı oluşturma süresini hızlandıran daha iyi, paralel indirme sağlar.

    Nasıl:

    <head> bölümünüzdeki <link> ve <style> etiketleinin her zaman <script> etiketinden önce geldiğinden emin olun.

  • iframe sayısını en aza indirin: high iframe'leri yalnızca teknik olarak başka bir imkanınız yoksa kullanın. Mümkün olduğunca iframe'lerden kaçınmaya çalışın.

  • Prefetch, dns-prefetch ve prerender ile Önyükleme Optimizasyonu: low Popüler tarayıcılar, belirli URL'leri önceden yüklemek için belirli anahtar kelimelerle birlikte <link> etiketi ve "rel" özelliği üzerindeki yönergeyi kullanabilir.

    Neden:

    Prefetching (önceden getirme) işlemi, bir tarayıcının, kullanıcının yakın gelecekte erişebileceği içeriği görüntülemek için gereken kaynakları arka planda getirmesini sağlar. Tarayıcı bu kaynakları önbelleğinde saklayabilir ve sayfa kaynakları için farklı alan adları kullandıklarında web sayfalarının yüklenme sürecini hızlandırabilir. Bir web sayfasının yüklenmesi bittiğinde ve etkieşimde bulunamama süresi geçtiğinde, tarayıcı diğer kaynakları da indirmeye başlar. Bir kullanıcı belirli bir bağlantıya girdiğinde, içerik (önceden hazırlanmış) anında sunulacaktır.

    Nasıl:

    <link> etiketinin <head> bölümünde olduğundan emin olun.

⬆ Yukarı Dön

CSS

css

  • Minimizasyon: high Tüm CSS dosyaları minmize edilir (küçültülür), yorumlar, beyaz boşluklar (white-spaces) ve yeni satırlar ilgili dosyalarından kaldırılır.

    Neden:

    CSS dosyaları küçültüldüğünde içerik daha hızlı yüklenir ve istemciye daha az veri gönderilir. Geliştirme sürecinde CSS dosyalarını küçültmek her zaman önemlidir. Bant genişliği maliyetlerini düşürmek ve kaynak kullanımını azaltmak isteyen her işletme için olduğu gibi kullanıcı için de faydalıdır.

    Nasıl:

    ⁃ Derleme ya da yayınlama öncesinde veya sırasında dosyalarınızı otomatik olarak küçültmek için araçlar kullanın.

  • Birleştirme: medium CSS files are concatenated in a single file (Not always valid for HTTP/2).

    <!-- Not recommended -->
    <link rel="stylesheet" href="foo.css" />
    <link rel="stylesheet" href="bar.css" />
    
    <!-- Recommended -->
    <link rel="stylesheet" href="foobar.css" />

    Why:

    If you are still using HTTP/1, you may need to still concatenate your files, it's less true if your server use HTTP/2 (tests should be made).

    How:

    ⁃ Use online tool or any plugin before or during your build or your deployment to concatenate your files.
    ⁃ Ensure, of course, that concatenation does not break your project.

  • Non-blocking: high CSS files need to be non-blocking to prevent the DOM from taking time to load.

    <link
        rel="preload"
        href="global.min.css"
        as="style"
        onload="this.rel='stylesheet'"
    />
    <noscript><link rel="stylesheet" href="global.min.css" /></noscript>

    Why:

    CSS files can block the page load and delay the rendering of your page. Using preload can actually load the CSS files before the browser starts showing the content of the page.

    How:

    ⁃ You need to add the rel attribute with the preload value and add as="style" on the <link> element.

  • Unused CSS: medium Remove unused CSS selectors.

    Why:

    Removing unused CSS selectors can reduce the size of your files and then speed up the load of your assets.

    How:

    ⚠️ Always check if the framework CSS you want to use don't already has a reset / normalize code included. Sometimes you may not need everything that is inside your reset / normalize file.

  • CSS Critical: high The CSS critical (or "above the fold") collects all the CSS used to render the visible portion of the page. It is embedded before your principal CSS call and between <style></style> in a single line (minified if possible).

    *Why:*
    > Inlining critical CSS help to speed up the rendering of the web pages reducing the number of requests to the server.
    
    *How:*
    > Generate the CSS critical with online tools or using a plugin like the one that Addy Osmani developed.
    
    * 📖 [Understanding Critical CSS](https://www.smashingmagazine.com/2015/08/understanding-critical-css/)
    * 🛠 [Critical by Addy Osmani on GitHub](https://github.com/addyosmani/critical) automates this.
    * 📖 [Inlining critical CSS for better web performance | Go Make Things](https://gomakethings.com/inlining-critical-css-for-better-web-performance/)
     * 🛠 [Critical Path CSS Generator - Prioritize above the fold content :: SiteLocity](https://www.sitelocity.com/critical-path-css-generator)
     * 📖 [Reduce the size of the above-the-fold content
    

    ](https://developers.google.com/speed/docs/insights/PrioritizeVisibleContent)

  • Embedded or inline CSS: high Avoid using embed or inline CSS inside your <body> (Not valid for HTTP/2)

    Why:

    One of the first reason it's because it's a good practice to separate content from design. It also helps you have a more maintainable code and keep your site accessible. But regarding performance, it's simply because it decreases the file-size of your HTML pages and the load time.

    How:

    Always use external stylesheets or embed CSS in your <head> (and follow the others CSS performance rules)

  • Analyse stylesheets complexity: high Analyzing your stylesheets can help you to flag issues, redundancies and duplicate CSS selectors.

    Why:

    Sometimes you may have redundancies or validation errors in your CSS, analysing your CSS files and removed these complexities can help you to speed up your CSS files (because your browser will read them faster)

    How:

    Your CSS should be organized, using a CSS preprocessor can help you with that. Some online tools listed below can also help you analysing and correct your code.

⬆ back to top

Fonts

fonts

  • Prevent Flash or Invisible Text: medium Avoid transparent text until the Webfont is loaded

⬆ back to top

Images

images

  • Use vector image vs raster/bitmap: medium Prefer using vector image rather than bitmap images (when possible).

    Why:

    Vector images (SVG) tend to be smaller than images and SVG's are responsive and scale perfectly. These images can be animated and modified by CSS.

⬆ back to top

JavaScript

javascript

  • JS Minification: high All JavaScript files are minified, comments, white spaces and new lines are removed from production files (still valid if using HTTP/2).

    Why:

    Removing all unnecessary spaces, comments and break will reduce the size of your JavaScript files and speed up your site's page load times and obviously lighten the download for your user.

    How:

    ⁃ Use the tools suggested below to minify your files automatically before or during your build or your deployment.

  • No JavaScript inside: medium (Only valid for website) Avoid having multiple JavaScript codes embedded in the middle of your body. Regroup your JavaScript code inside external files or eventually in the <head> or at the end of your page (before </body>).

    Why:

    Placing JavaScript embedded code directly in your <body> can slow down your page because it loads while the DOM is being built. The best option is to use external files with async or defer to avoid blocking the DOM. Another option is to place some scripts inside your <head>. Most of the time analytics code or small script that need to load before the DOM gets to main processing.

    How:

    Ensure that all your files are loaded using async or defer and decide wisely the code that you will need to inject in your <head>.

  • Non-blocking JavaScript: high JavaScript files are loaded asynchronously using async or deferred using defer attribute.

    <!-- Defer Attribute -->
    <script defer src="foo.js"></script>
    
    <!-- Async Attribute -->
    <script async src="foo.js"></script>

    Why:

    JavaScript blocks the normal parsing of the HTML document, so when the parser reaches a <script> tag (particularly is inside the <head>), it stops to fetch and run it. Adding async or defer are highly recommended if your scripts are placed in the top of your page but less valuable if just before your </body> tag. But it's a good practice to always use these attributes to avoid any performance issue.

    How:

    ⁃ Add async (if the script don't rely on other scripts) or defer (if the script relies upon or relied upon by an async script) as an attribute to your script tag.
    ⁃ If you have small scripts, maybe use inline script place above async scripts.

  • Optimized and updated JS libraries: medium All JavaScript libraries used in your project are necessary (prefer Vanilla JavaScript for simple functionalities), updated to their latest version and don't overwhelm your JavaScript with unnecessary methods.

    Why:

    Most of the time, new versions come with optimization and security fix. You should use the most optimized code to speed up your project and ensure that you'll not slow down your website or app without outdated plugin.

    How:

    If your project use NPM packages, npm-check is a pretty interesting library to upgrade / update your libraries. Greenkeeper can automatically look for your dependencies and suggest an update every time a new version is out.

⬆ back to top

Server

server-side

  • Your website is using HTTPS: high

    Why:

    HTTPS is not only for ecommerce websites, but for all websites that are exchanging data. Data shared by a user or data shared to an external entity. Modern browsers today limit functionalities for sites that are not secure. For example: geolocation, push notifications and service workers don't work if your instance is not using HTTPS. And today is much more easy to setup a project with an SSL certificate than it was before (and for free, thanks to Let's Encrypt).

  • Minimizing HTTP requests: high Always ensure that every file requested are essential for your website or application.
  • Use a CDN to deliver your assets: medium Use a CDN to deliver faster your content over the world.
  • Serve files from the same protocol: high Avoid having your website serving files coming from source using HTTP on your website which is using HTTPS for example. If your website is using HTTPS, external files should come from the same protocol.

  • Serve reachable files: high Avoid requesting unreachable files (404).

  • Set HTTP cache headers properly: high Set HTTP headers to avoid expensive number of roundtrips between your browser and the server.
  • GZIP / Brotli compression is enabled: high Use a compression method such as Gzip or Brotli to reduce the size of your JavaScript files. With a smaller sizes file, users will be able to download the asset faster, resulting in improved performance.

⬆ back to top


Performances and JS Frameworks

Angular

React

Vue

Performances and CMS

WordPress

Articles

Plugins recommended


Translations

The Front-End Performance Checklist wants to also be available in other languages! Don't hesitate to submit your contribution!

Contributing

Open an issue or a pull request to suggest changes or additions.

Support

If you have any question or suggestion, don't hesitate to use Discord or Twitter:

Author

**Build with ❤️ by David Dias

Contributors

This project exists thanks to all the people who contribute. [Contribute].

Backers

Thank you to all our backers! 🙏 [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

License

MIT

All icons are provided by Icons8

⬆ back to top

front-end-performance-checklist's People

Contributors

thedaviddias avatar prayagverma avatar lex111 avatar hdpero avatar verlok avatar denar90 avatar erntrgt avatar firattale avatar ms-fadaei avatar parksb avatar paulirish avatar knoxmic avatar alekseykulikov avatar annnoo avatar bartveneman avatar benschwarz avatar stmapman7 avatar bnjis avatar bmac avatar jericopulvera avatar marbio avatar jakubhomoly avatar jason-cooke avatar jennifert avatar joelopresti avatar jondavidjohn avatar limonte avatar lukelogrocket avatar mattzeunert avatar mfranzke avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.