Back to Question Center
0

Semalt: Shin masu bincike suna gane fayiloli guda da ke aiki da wasu subdomains?

1 answers:

Ina da dukiyar yanar gizonku na ajiyayyu a kan Amazon S3 kuma na amfani da CloudFront, daga wani yanki na yanki, don aiki a matsayin wani yanki na kuki (don haka shafin yanar gizo. com don shafin yanar gizo da websitestatic. com don kayan haɓaka). Na saita wani wuri mai nisa Ana fitar da kaifikan , don haka za a iya ajiye su ta hanyar mai bincike - ðºñƒð¿ð¸ñ‚ñŒ ð±ð¾ð»ñŒñˆð¾ð¹ ð¼ð¾ð´ñƒð»ñŒð½ñ‹ð¹ ð´ð¸ð²ð°ð½.

Google PageSpeed ​​ya bada shawarar: Saukewa da daidaito a fadin sunaye . Zan iya cim ma wannan ta ƙara manyan fayilolin da ke nuna wannan rarraba CloudFront sannan sannan in danna URL ga dukiya na, saboda haka zan iya media1. websitestatic. com , media2. websitestatic. com , media3. websitestatic. com .

Tambayata ita ce, masu bincike za su gane fayiloli guda kamar kasancewa daidai da waɗanda aka cached, idan an yi amfani da su daga wasu subdomains? Kamar yadda media1 , media2 , da dai sauransu duk suna aiki da fayilolin guda, idan sama da shafuka guda biyu ana buƙatar wannan hoton daga media1 na farko, to, media2 na gaba, shin mai bincike zai gane wannan ko zai sauke shi?

Zan iya kirkiro adireshin URL ɗin a cikin fayiloli na HTML wadanda suke hidima fayil ɗin ( media1 , media4 , media8 , da sauransu.. ) amma ba zan iya adana wannan lambar baƙuwar ba don kowane fayil na musamman don haka an yi amfani da ita daga wannan yanki a kowane lokaci.

Ina yin la'akari da amsar ita ce ba, ba za su iya ba, don haka idan na aiwatar da takaddun shaida, ba zan iya samun damar amfani da shi ba, kamar yadda ka'idojin kowane shafi ke buƙatar ka iya samun wani yanki na daban don wannan fayil.

February 7, 2018

masu bincike za su gane fayiloli guda kamar kasancewa daidai da waɗanda aka kulla, idan an yi amfani da su daga wasu subdomains?

A'a. Filali guda biyu da aka yi amfani da su daga wurare daban-daban suna fayiloli daban-daban har zuwa mai bincike (cache).

URL ɗin shine maɓallin kewayawa wanda ake buƙatar fayil din ta mai bincike.

Kamar yadda kafofin watsa labaru1, media2 da sauransu duka suna aiki da fayilolin guda, idan sama da shafi biyu suna buƙatar hotunan guda ɗaya daga media1 farko, to, media2 na gaba, shin mai bincike zai gane wannan ko zai sake sauke shi?

Za a sake sauke shi.

Mai bincike ba shi da wata hanyar da za ta san cewa URL ɗin guda biyu masu rarraba guda ɗaya ne.

Ina tsammanin tambayar da kake da ita shine: Ta yaya zan karbi fayiloli a kan yankuna masu yawa ba tare da samun saukewa ba kamar yadda akwai domains (wow. ne Ingilishi? Yi hakuri na Faransa ne)

Zaka iya rike wannan ta hanyar zabar hikima inda fayilolinku ke fitowa daga. Hanyoyi guda biyu:

  • Yi amfani da algorithm da aka tsara don yanke shawarar wane yanki don karɓa (i. e. babu wata hanya) Ga misali, "duk JS yana zuwa 1, duk CSS zuwa 2, duk sauran zuwa 3", ko "duk fayiloli da suka fara da 'a' je zuwa 1, 'b' 2, 'c' 3, 'd' 4

  • Ƙari mafi wuya, amma har yanzu doable a cikin kowane harshe na san: Shin m sharding. Ɗauki adireshin, shigar da MD5 zuwa gare shi (ko SHA1 ko duk abin da ya dace), jefa shi zuwa lamba mai lamba, ɗauka modulo tare da yawan yankunan da kake da shi. Misali: "/ wp-abun ciki / hotuna / 2013/01 / cat. jpg "MD5-hashes zuwa 25d81ba602071aa703c98dfaa452322d, wanda ya tuba zuwa lamba 50303532743047232046842026848642404426, wanda, aka ba 2 domains, ya ce" Ina cikin yankin 0 ", saboda 50303532743047232046842026848642404426% 2 = 0.

Tare da mafita biyu, za ku yada fayilolinku, amma kowa yana zuwa yanki daya. Amfani na biyu shine mafi alhẽri idan kana da tsari na filenames, saboda yana tabbatar da cewa an rarraba su daidai, yayin da farkon bayani shine sauri, mafi sauki, amma zai iya aika dukkan hotuna a cikin wani yanki, kuma baza ku yi nasara ba a ƙarshen.