I-HTML Minifier
Nge-minifier ye-HTML, ungakwazi ukunciphisa ikhodi yomthombo yekhasi lakho le-HTML. Nge-compressor ye-HTML, ungasheshisa ukuvulwa kwamawebhusayithi akho.
Yini i-HTML minifier?
Sanibonani balandeli be-Softmedal, esihlokweni sanamuhla, sizoqale sikhulume ngethuluzi lethu lamahhala lokunciphisa i-HTML nezinye izindlela zokucindezelwa kwe-HTML.
Amawebhusayithi aqukethe i-HTML, CSS, amafayela eJavaScript. Ngamanye amazwi, singasho ukuthi lawa amafayela athunyelwe ohlangothini lomsebenzisi. Ngaphandle kwalawa mafayela, kukhona neMedia (isithombe, ividiyo, umsindo, njll.). Manje, lapho umsebenzisi enza isicelo kuwebhusayithi, uma sicabanga ukuthi ulande lawa mafayela esipheqululini sakhe, lapho amasayizi wefayela aphezulu, ithrafikhi izokwanda. Umgwaqo udinga ukunwetshwa, okuzoba umphumela wokwanda kwezimoto.
Kanjalo, amathuluzi ewebhusayithi nezinjini (Apache, Nginx, PHP, ASP njll.) anesici esibizwa nge-output compression. Ngalesi sici, ukucindezela amafayela akho okukhiphayo ngaphambi kokuwathumela kumsebenzisi kuzonikeza ukuvuleka kwekhasi okusheshayo. Lesi simo sisho ukuthi: Noma ngabe iwebhusayithi yakho ishesha kangakanani, uma imiphumela yefayela yakho mikhulu, izovuleka kancane ngenxa yethrafikhi yakho ye-inthanethi.
Kunezindlela eziningi zokusheshisa ukuvulwa kwesayithi. Ngizozama ukunikeza ulwazi oluningi ngangokunokwenzeka mayelana nokucindezelwa, okungenye yalezi zindlela.
- Ungenza okuphumayo kwakho kwe-HTML ngokusebenzisa ulimi lwesofthiwe olusebenzisile, isihlanganisi, nama-plug-ins aseceleni kweseva. I-Gzip iyindlela esetshenziswa kakhulu. Kodwa udinga ukunaka isakhiwo ku-Limi, Compiler, Server trilogy. Qiniseka ukuthi i-algorithm yokuminyanisa olimini, i-algorithm yokuminyanisa kusihlanganisi nama-algorithms okucindezela anikezwe Iseva kuyahambisana. Kungenjalo, ungase uthole imiphumela engathandeki.
- Futhi kuyindlela yokunciphisa amafayela akho e-HTML, CSS kanye ne-Javascript ngangokunokwenzeka, ukususa amafayela angasetshenzisiwe, ukubiza amafayela asetshenziswa ngezikhathi ezithile kulawo makhasi nokuqinisekisa ukuthi azikho izicelo ezenziwa njalo. Khumbula ukuthi amafayela e-HTML, CSS kanye ne-JS kufanele agcinwe nohlelo esilubiza nge-Cache kuziphequluli. Kuyiqiniso ukuthi sibhala imibhalo engezansi amafayela akho e-HTML, CSS kanye ne-JS ezindaweni zakho ezijwayelekile zokuthuthuka. Kulokhu, ukushicilela kuzoba sendaweni yokuthuthukisa size sikubize ngokuba bukhoma (ukushicilela). Ngenkathi ubukhoma, ngingancoma ukuthi ucindezele amafayela akho. Uzobona umehluko phakathi kosayizi bamafayela.
- Kumafayela emidiya, ikakhulukazi izithonjana nezithombe, singakhuluma ngokulandelayo. Ngokwesibonelo; Uma usho isithonjana kaninginingi bese ubeka isithonjana se-16X16 kusayithi lakho njengo-512×512, ngingasho ukuthi leso sithonjana sizolayishwa njengo-512×512 kuqala bese sihlanganiswa njengo-16×16. Ngalokhu, udinga ukunciphisa osayizi bamafayela futhi ulungise izinqumo zakho kahle. Lokhu kuzokunika inzuzo enkulu.
- Ukucindezelwa kwe-HTML nakho kubalulekile ngolimi lwesofthiwe ngemuva kwewebhusayithi. Lokhu kucindezela empeleni kuyinto okufanele icatshangelwe lapho ubhala. Yilapho umcimbi esiwubiza nge-Clean Code ungena khona. Ngoba ngenkathi isiza sihlanganiswa ohlangothini lweseva, amakhodi akho angadingekile azofundwa futhi acutshungulwe ngayinye ngayinye ngesikhathi se-CPU / Iphrosesa. Amakhodi akho angadingekile azonwebeka ngalesi sikhathi ngenkathi i-mini, milli, micro, noma yini oyishoyo izokwenzeka ngemizuzwana.
- Kumithombo yezindaba enobukhulu obuphezulu njengezithombe, ukusebenzisa ama-plugin angemuva kokulayisha (LazyLoad njll.) azoshintsha isivinini sokuvula ikhasi lakho. Ngemuva kwesicelo sokuqala, kungathatha isikhathi eside ukuthi amafayela adluliselwe ohlangothini lomsebenzisi kuye ngesivinini se-inthanethi. Ngomcimbi wokulayisha okuthunyelwe, kungaba isincomo sami ukusheshisa ukuvulwa kwekhasi futhi udonse amafayela emidiya ngemuva kokuvulwa kwekhasi.
Kuyini ukucindezelwa kwe-HTML?
Ukucindezelwa kwe-Html kuyisici esibalulekile sokusheshisa isayithi lakho. Sonke siyathuthumela lapho amasayithi esiwaphequlula ku-inthanethi esebenza kancane futhi ehamba kancane, futhi sishiya isayithi. Uma senza lokhu, kungani abanye abasebenzisi kufanele bavakashele futhi lapho behlangabezana nale nkinga kumasayithi ethu. Ekuqaleni kwezinjini zokusesha, i-Google, i-yahoo, i-bing, i-yandex njll. Lapho ama-bots evakashela isayithi lakho, iphinde ihlole isivinini kanye nedatha yokufinyeleleka mayelana nesayithi lakho, futhi uma ithola amaphutha kunqubo ye-seo ukuze isayithi lakho lifakwe kumazinga, iqinisekisa ukuthi ufakwe ohlwini emakhasini angemuva noma emiphumeleni. .
Cindezela amafayela e-HTML esayithi lakho, sheshisa iwebhusayithi yakho futhi wenze isikhundla esiphakeme ezinjinini zokusesha.
Yini i-HTML?
I-HTML ayikwazi ukuchazwa njengolimi lokuhlela. Ngoba uhlelo olusebenza ngokwalo alukwazi ukubhalwa ngamakhodi e-HTML. Izinhlelo ezingasebenzisa izinhlelo ezingatolika lolu limi kuphela ezingabhalwa.
Ngethuluzi lethu lokucindezela le-HTML, ungacindezela amafayela akho e-html ngaphandle kwezinkinga. Ngokuqondene nezinye izindlela./p>
Thatha ithuba lokulondolozwa kwesiphequluli
Ukuze usebenzise isici sokulondoloza inqolobane yesiphequluli, unganciphisa amafayela akho e-JavaScript/Html/CSS ngokwengeza amakhodi athile e-mod_gzip kufayela lakho le-.htaccess. Okulandelayo okudingeka ukwenze ukunika amandla ukulondoloza isikhashana.
Uma unesayithi elisekelwe ku-wordpress, maduze sizoshicilela i-athikili yethu mayelana nama-plugin we-caching angcono kakhulu kanye nokucindezela ngencazelo ebanzi.
Uma ufuna ukuzwa ngezibuyekezo nolwazi mayelana namathuluzi amahhala azosebenza, ungasilandela kuma-akhawunti wethu wenkundla yezokuxhumana kanye nebhulogi. Uma nje ulandela, uzoba ngomunye wabantu bokuqala abazoqaphela intuthuko entsha.
Ngenhla, sikhulume ngethuluzi lokusheshisa isayithi kanye nethuluzi lokucindezela i-html kanye nezinzuzo zokucindezela amafayela we-html. Uma unemibuzo, ungasithola ngokuthumela umlayezo ovela efomini lokuxhumana ku-Softmedal.