A cikin wannan labarin, za mu bincika yadda ake haɓaka Laravel aikace-aikacen don haɓaka lokacin ɗaukar shafi akan na'urorin hannu da samar da ingantaccen ƙwarewar mai amfani da wayar hannu.
Yi Amfani da Zane Mai Amsa
Tabbatar cewa aikace-aikacenku yana da ƙira mai amsawa don daidaita shimfidar wuri da mu'amala ta atomatik akan na'urorin hannu daban-daban. Yi amfani da tambayoyin kafofin watsa labarai da dabarun CSS don daidaita yanayin dubawa da nuna abubuwan da suka dace dangane da girman allo na kowace na'ura.
Rage girman CSS da JavaScript
Yi amfani da tsarin CSS mara nauyi kuma iyakance mara amfani JavaScript don rage lokacin ɗaukar shafi. Inganta CSS da JavaScript lamba ta hanyar cire sassan da ba a yi amfani da su ba kuma yi amfani da kayan aikin kamar ragewa da gzip don damfara lambar.
Inganta Hoto da Abun ciki
Pre-inganta hotuna kafin loda su zuwa aikace-aikacen don rage girman hoto da lokacin lodawa. Yi amfani da tsarin hoto masu dacewa kamar WebP don ƙara rage girman fayil. Yi la'akari da yin amfani da ƙaramin abun ciki mai ƙarfi kuma a maimakon haka samar da abun ciki na tsaye don rage lokacin lodi.
Cache
da Ma'ajiyar Yanar Gizo
Yi amfani da caching na burauza don adana bayanai na ɗan lokaci da albarkatun abun ciki, rage lokacin ɗaukar shafi don ziyarar gaba. Taimaka ma'ajiyar layi don bawa masu amfani damar samun dama ga shafukan da aka gani a baya cikin yanayin layi.
Gwajin Aiki da Ingantawa
Yi amfani da kayan aikin gwajin aiki kamar Google PageSpeed Insights ko Haske don tantance aikin aikace-aikacenku akan na'urorin hannu da karɓar shawarwarin haɓakawa. Haɓaka lambar tushe da albarkatu bisa sakamakon gwajin aiki.
Rage Jagoranci da Buƙatun hanyar sadarwa:
Rage adadin turawa akan aikace-aikacenku kuma rage adadin buƙatun hanyar sadarwa don rage lokacin ɗaukar shafi. Tabbatar cewa hanyoyin haɗin kan aikace-aikacen suna nuna kai tsaye zuwa shafin da ake nufi ba tare da turawa mara amfani ba.
Haɓaka aikace-aikacen ku Laravel don lokacin lodin wayar hannu ba kawai yana haɓaka ƙwarewar mai amfani da wayar hannu ba har ma yana samar da dacewa da sha'awa ga masu amfani da wayar hannu.