Cov txheej txheem:

Yuav ua li cas koj optimize qhov tseem ceeb rendering txoj kev?
Yuav ua li cas koj optimize qhov tseem ceeb rendering txoj kev?

Video: Yuav ua li cas koj optimize qhov tseem ceeb rendering txoj kev?

Video: Yuav ua li cas koj optimize qhov tseem ceeb rendering txoj kev?
Video: Kuv tau koj nyob rau tiam twg(qub dab neeg) 4/22/2022 2024, Kaum ib hlis
Anonim

Cov txheej txheem dav dav ntawm cov kauj ruam los txhim kho txoj hauv kev tseem ceeb yog:

  1. Tshawb xyuas thiab qhia koj tus kheej txoj kev tseem ceeb : tus naj npawb ntawm cov peev txheej, bytes, ntev.
  2. Tsawg tus naj npawb ntawm tseem ceeb cov ntaub ntawv: tshem tawm lawv, ncua lawv rub tawm, cim lawv li async, thiab lwm yam.

Tsis tas li ntawd, txoj hauv kev tseem ceeb yog dab tsi?

Cov Critical Rendering Path yog cov theem ntawm cov kauj ruam uas browser mus dhau los hloov HTML, CSS, thiab JavaScript rau hauv pixels ntawm qhov screen. Optimizing cov tseem ceeb render txoj kev txhim kho ua kev ua tau zoo. Optimizing cov txoj kev tseem ceeb rendering txhim kho lub sijhawm ua ntej ua.

Ib sab saum toj no, dab tsi yog saum lub fold CSS? Saum toj saud cov ntsiab lus yog ib feem ntawm lub vev xaib uas pom hauv qhov browser qhov rai thaum nplooj ntawv thawj zaug. Google xav pom inline CSS rho tawm los ntawm koj lub ntsiab CSS cov ntaub ntawv thiab txhaj rau hauv lub taub hau tag, tso cai rau txhua yam koj pom ua ntej yuav tsum tau thauj khoom ua ntej.

Tom qab ntawd, lo lus nug yog, yuav ua li cas kuv thiaj li txwv tsis pub Dom loj?

  1. txo cov widgets / ntu hauv koj cov nplooj ntawv web lossis nplooj ntawv layouts.
  2. siv lub web page builder yooj yim raws li ntau nplooj ntawv builders ntxiv ntau cov code bloat.
  3. siv lub ntsiab lus sib txawv.
  4. siv tus slider sib txawv.

Koj yuav ua li cas rau qhov browser?

Thaum lub web page yog loaded, lub browser thawj zaug nyeem TEXT HTML thiab tsim DOM Tsob Ntoo los ntawm nws. Tom qab ntawd nws ua cov CSS seb qhov ntawd yog inline, kos lossis sab nraud CSS thiab tsim CSSOM Ntoo los ntawm nws. Tom qab cov ntoo no tsim, ces nws tsim lub Render - Tsob ntoo los ntawm nws.

Pom zoo: