Have you optimised your site code? Vai jums optimizēt savu saitu kodu?

ADVERTISEMENT REKLĀMA
To get our software and web/tips via email, sign up for Lai veicinātu mūsu programmatūru un web / padomus pa e-pastu, pierakstīties daily email newsletter ikdienas e-pasta biļetens . .
Subscribe to RSS feed Subscribe to RSS feed or vai follow me sekojiet man on Twitter? on Twitter?

Website optimization is an important process for every webmaster trying to reach “the top”. Optimizāciju ir nozīmīgs process ikvienam webmaster cenšoties sasniegt "top". It includes several parts, some of which may not be plausible for all. Tā ietver vairākas daļas, no kurām dažas var nebūt ticams visiem. Optimisation refers to the cleaning of code markup, images and backend so that your site loads quickly, and causes less stress on your webserver. Optimizācija attiecas uz tīrīšanu kods atzīmes, attēlus un aizmuguri, lai jūsu vietnē slodzes ātri un rada mazāk stresa uz jūsu tīmekļa servera.

The Importance of Optimization Svarīgums Optimization

Website optimisation is important, because more optimized pages translate into lower load times. Tīmekļa vietne optimizācija ir svarīga, jo vairāk optimizēti lapas izpaužas kā mazāka slodze reizes. In today's world, “everyone wants everything quickly”, so quick and responsive sites help you to retain your visitors more. Mūsdienu pasaulē, "visi grib visu ātri", lai ātri un atsaucīgi vietām palīdzēs jums saglabāt jūsu apmeklētājiem vairāk. In other words, you can cut down or eliminate the number of frustrated surfers who ditch your blog because it doesnt load quickly. Citiem vārdiem sakot, jūs varat samazināt vai novērst skaitu, neapmierināti sērfotājiem, kas grāvja savu blogu, jo tas doesn't slodze ātri. This is more relevant if your blog is targeted towards a non-tech-savvy audience, who are likely to have slower connections. Tas vairāk attiecas, ja jūsu emuārs ir vērsti uz ne-tech-savvy auditoriju, kas varētu būt lēnāks savienojumiem.

By optimization, you can save some bandwidth(although this is not why most people do it). Ar optimizācija, Jūs varat ietaupīt joslas (kaut gan tas nav, kāpēc lielākā daļa cilvēku to dara). Also, in times of intensive activity, like being Dugg or Stumbled, optimization can be the difference between your blog going offline due to stress, and your blog staying healthy even while getting ~50k visits in a day. Arī laikā, kad intensīva darbība, piemēram, ir Dugg vai paklupa, optimizācija var būt atšķirība starp jūsu emuāru Dodoties bezsaistē sakarā ar stresu, un jūsu emuāru Veselība pat laikā iegūt ~ 50k apmeklējumu dienā.

Some of the easiest optimization techniques include compression of codes whenever possible (like CSS), compression of images for lower sizes (use Photoshop), and reducing the number of http requests and number of objects. Daži no vienkāršākajiem optimizācijas metodes ir kompresija ar kodiem vien iespējams (piemēram, CSS), kompresijas attēlu zemākas izmēri (izmantot Photoshop) un samazinot skaitu http pieprasījumu un priekšmetu skaita. There are also hardcore stuff, including tweaking your webserver (which few can do), tweaking your scripts to execute faster, reduce the number of PHP functions in your theme etc. Ir arī hardcore sīkumi, tai skaitā uzlabot savu tīmekļa servera (kas maz var darīt), uzlabot savu skriptu izpildīt ātrāk, samazinātu skaitu PHP funkcijas jūsu tēmu utt

My guiding light Mani vadošais gaismas

Paul Stamatiou is an optimization-crazy college student, and has written several guides. Paul Stamatiou ir optimizācijas-crazy college students, un ir uzrakstījis vairākus ceļvežus. I found Paul Stamatiou's guides, Es atklāju Paul Stamatiou Instrukcijas, How to Optimize your CSS Kā optimizēt savu CSS and un 5 ways to speed up your site 5 veidi, lai paātrinātu jūsu vietnē amazing. apbrīnojams. After reading them a few times and implementing a few steps, I was able to cut down the loading time of this blog from 27 seconds on a dialup, to around 6 seconds! Pēc iepazīšanās ar to pāris reizes un ieviešot dažus soļus, man bija iespēja samazināt lapas ielādes laiku, šajā emuārā no 27 sekundēm iezvanpieejas līdz aptuveni 6 sekundes! I used his blog as a benchmark, because he is pretty much up there with the best in optimization. Es izmantoja savu blogu par etalonu, jo viņš ir diezgan daudz tur augšā ar labākajiem optimizāciju.

I took his advice to heart, and experimented a little more. Es paņēmu viņa padomu pie sirds, un izmēģina nedaudz vairāk. More specifically, here are the steps (I will have a detailed How-to post later, so watch out!): Precīzāk, šeit ir pakāpieni (man būs sīki How-to post vēlāk, tādēļ Uzmanies!):

  • Deleted all unnecessary images, like the RSS feed icon and Technorati Fav button. Saved 4Kb. Svītrots visas nevajadzīgās attēlus, piemēram, RSS feed ikonas un Technorati Fav pogu. Saglabātie 4KB.
    If you cannot abandon your images, at least move them to the same server ( uploads, or images folder). Ja nevarat atteikties attēlu, vismaz pārvietotu tos uz paša servera (attēli, vai attēli mapi).
  • Compressed the CSS using Saspiests CSS, izmantojot CleanCSS CleanCSS . Saved 3Kb. . Saglabātās 3KB.
  • Used PHP compression for CSS stylesheet, as Stammy(above) suggested. Saved 2Kb. Used PHP saspiešanu CSS stilu, kā Stammy (augstāk) ierosināts. Saglabātie 2Kb.
  • Removed the earlier header image, which was 500 x 200, and replaced it with a smaller 412 x 118px, with a white background. Removed agrāk header image, kas ir 500 x 200, un aizstāt to ar mazāku 412 x 118px, ar baltu fonu. White backround was very helpful. Saved 10Kb. Balta backround bija ļoti noderīga. Saglabātie 10Kb.

So, that cut down the size by 19Kb, without compromising much on quality. Tā, ka samazināt lielumu par 19Kb, neapdraudot daudz par kvalitāti. I am not (yet) aware of all the server-side optimisation, so no comments there. Es neesmu (vēl) nav zināmi visi servera optimizācijas, tāpēc bez komentāriem tur. Long story short, the optimisation bug is on me too Garš stāsts īss, optimizācija bug ir par mani pārāk : D

On a lighter note, I actually managed to beat Stammy's blog load times by a good margin. Par šķiltavu zināšanai, es tiešām izdevies pārspēt Stammy's blog slodze reizes ar labu rezervi.

Web Page Speed Test

ADVERTISEMENT REKLĀMA

It is probably due to the sponsor images on his sidebar. Tas ir iespējams tāpēc, ka apgādniekam attēlus uz viņa sānjoslas. His blog is hosted on MediaTemple's (dv) server. Viņa blogs ir izvietots uz MediaTemple's (DV) serveri. For reference, this blog is on a shared webhost (for now). Par prejudiciāla jautājuma uzdošanu, šis blogs ir par kopīgu webhost (pašlaik).

Here are (56K speeds of ) some sites according to Šeit ir (56K ātrumu) daži teritoriju atbilstīgi Web Page Analyzer Web Page Analyzer , as of August 19, 2007 , Sākot ar 2007 Augusts 19,

(Note: These are time taken for loading, and not actual rendering in the browser): (Piezīme: Tie ir laiks, par kravu iekraušanu, un ne faktiski padarot in browser):

PaulStamatiou.com – PaulStamatiou.com -- 7.08 seconds 7,08 sekundes
TechZilo (this blog) – TechZilo (šis blog) -- 4.33 seconds 4,33 sekundes
TechCrunch – TechCrunch -- 204.97 seconds 204,97 sekundes

Why did I show these load times? Kāpēc man rāda šo slodzi reizes? Bragging rights? Bragging tiesības? No.

Just to prove that even big sites like TechCrunch could do with a bit of optimization. Tikai, lai pierādītu, ka pat lielie saiti kā TechCrunch varētu darīt ar mazliet optimizāciju. I am sure that Mike Arrington will have no problem in wasting extra bandwidth, losing some frustrated visitors or being Dugg. Esmu pārliecināts, ka Mike Arrington nebūs problēma novājēšanas extra bandwidth, zaudējot dažas neapmierinātas apmeklētāju ir Dugg. However, 204 seconds is way too much by any standards. Tomēr, 204 sekundes ir pārāk daudz pēc jebkuriem standartiem.

So, make sure you optimize your blog the next time you decide to get your hands dirty in code Tātad, pārliecinieties, vai jums optimizēt savu emuāru nākamajā reizē, kad jūs izvēlēsieties saņemt rokām netīrs ar kodu ;)

To get our latest articles, Lai veicinātu mūsu jaunākos rakstus, click here to sign up noklikšķiniet šeit, lai piereģistrētos for our free email newsletter or subscribe to mūsu bezmaksas informatīvais biļetens e-pastu vai parakstīties uz RSS feed RSS feed

§ Comments § Komentāri
  • Paul Stamatiou says: Paul Stamatiou saka:

    The Web Page Analyzer is based on several things such as the user's location and download speed (i think). Web Page Analyzer pamatā ir vairākas lietas, piemēram, lietotāja atrašanās vietu un lejupielādes ātrums (i think). As such it says 1.55, 1.06, 16.14 for the three sites you mentioned, in that order for me and will probably say something different for someone else. Pati par sevi tā saka, 1,55, 1,06, 16,14 par trim vietām jūs minēts, ka lai man un, iespējams, pateikt kaut ko citu kādam citam.

  • Sumesh says: Sumesh saka:

    @Paul: Thanks for dropping by. @ Paul: Thanks for dropping by. I forgot to add that all speeds were for dialup. Es aizmirsu piebilst, ka jebkurā ātrumā bija uz iezvanpieejas. Hope that solves your problem. Ceru, ka atrisina Jūsu problēmu.

  • Ashwini says: Ashwini saka:

    thats the min disadvantage of self hosted blogs and thats where blogger wins! thats min sliktu sevis uzņēma blogus un thats kur blogger uzvar!
    I haven't faced any such problems, Neesmu saskārusies šādas problēmas,
    Most of surfers now have a broadband , and with i my blog hardly takes two seconds Lielākā daļa no Sērfotājiem tagad ir platjoslas pakalpojumiem, un I manu blogu diez notiek divas sekundes

    Although some graphics take time but text is visible once u type in address. Kaut arī daži grafikas nepieciešams laiks, bet ir redzams teksts vienreiz u ierakstiet adresi.

    n I hav got a cool report n i hav got cool ziņojumu
    HTML: 19708 4.13 0.30 HTML: 19.708 4,13 0,30
    HTML Images: 196940 45.65 7.44 HTML Attēli: 196.940 45,65 7,44
    CSS Images: 0 0.00 0.00 CSS Attēli: 0 0.00 0.00
    Total Images: 196940 45.65 7.44 Total Images: 196.940 45,65 7,44
    Javascript: 84241 18.39 2.05 Javascript: 84.241 18,39 2,05
    CSS: 3761 1.55 0.82 CSS: 3.761 1,55 0,82
    Multimedia: 0 0.00 0.00 Multimedia: 0 0.00 0.00
    Other: 0 0.00 Citi: 0 0,00

    Tip: Red color doesn’t matches with white color, try something else and don’t you think overloaded text link ads advertisement? Padoms: Sarkanā krāsa doesnâ € ™ t sacensībām ar baltu krāsu, mēģināt kaut ko citu, un sieviete € ™ t jūs domājat pārslogoti teksta saites reklāmas sludinājums?

  • Sumesh says: Sumesh saka:

    @Ashwini: Blogger sure wins, since Google's servers are among the fastest (though not the most reliable). @ Ashwini: Blogger pārliecināts uzvar, jo Google serveri ir starp visātrāk (kaut arī ne visticamākais). But the lack of flexibility really is the problem. Bet elastīguma trūkums patiešām ir problēma. With advanced compression techniques, light-weight theme and reasonable server, WordPress can beat Blogger. Ar uzlabotās kompresijas metodēm, vieglas tēmu un saprātīga servera, WordPress var pārspēt Blogger.
    Especially since Blogger themes are notorious for tonnes of JavaScript (check the source code towards the end). Jo īpaši tādēļ, Blogger tēmas ir pazīstami ar tonnām JavaScript (pārbauda pirmkodu uz beigām). It isn't added by the us, but by Blogger automatically. Tas nav pievienots ar mums, bet Blogger automātiski.

    I am changing the colour scheme of the theme, one bit at a time. Es esmu mainot krāsu shēmu tēmu, viens bits ar laiku. I changed the header, footer and navbar. Es mainīts galveni, kājeni un Navbar. Next up, content+sidebars. Next up, saturs + sidebars. OK? OK? As for ads, they're affiliate links, nofollowed and harmless in the sidebar. Kas attiecas uz reklāmām, viņi filiāli saites, nofollowed un nekaitīgas sānjoslas. Maybe I should reduce them to the most-rewarding ones only. Maybe Varbūt es to samazināt līdz vislielākās apbalvot tiem only. Varbūt

  • Paul Stamatiou says: Paul Stamatiou saka:

    There's also Pastāv arī http://tools.pingdom.com/fpt/ http://tools.pingdom.com/fpt/ which I think is much more accurate than Web Page Analyzer. kas, manuprāt, ir daudz precīzāks nekā Web Page Analyzer.

  • Sumesh says: Sumesh saka:

    @Paul: I had tried it, but it was before the optimization craze ( which is thanks to you!) @ Paul: biju mēģinājis, bet tas bija pirms optimizācijas padarīt traku (kas ir paldies jums!) : D
    Let me check it now. Ļaujiet man to pārbaudīt tagad.

  • Michael says: Michael says:

    my blog gets 135 seconds, not exactly great. my blog saņem 135 sekundes nav gluži lieliski. I guess I need to do some blog optimizing myself but at least I am faster then Techcrunch. Es domāju, man ir nepieciešams veikt dažas blog pilnveidot sevi, bet vismaz es esmu ātrāks tad Techcrunch.

  • Sumesh says: Sumesh saka:

    @Michael : TechCrunch is slow mostly because of graphics (sponsors on sidebar). @ Michael: TechCrunch ir lēns, galvenokārt tāpēc, ka grafiku (sponsoru par sānjoslas). Yours is slow because of the theme – it depends on background images too much. Jūsu ir lēns, jo tēma - tas ir atkarīgs no fona attēlus pārāk daudz. Don't do too much optimization – your theme might get bland (as mine is). Nedarām pārāk daudz optimizācija - savu tēmu var saņemt maigs (kā raktuves ir). Besides, it depends on the target audience – if they're high-tech, there's no problem, since they will have high-speed connection. Turklāt, tas ir atkarīgs no mērķauditorijas - ja viņi augsto tehnoloģiju, tur nekādu problēmu, jo tiem būs liela ātruma pieslēgumu.

  • TonNet says: TonNet saka:

    Sumesh even when I wasn't paying attention to your advise still our blog loads at 4 secs (Paul Stamatiou suggestion). Sumesh pat ja man nepievērš uzmanību jūsu padomu joprojām mūsu blogu slodzei 4 secs (Paul Stamatiou ierosinājums). Not that bad! Nav tik slikti! Anyways, I still think we have some Optimization to do. Anyways, es joprojām domāju, ka mums ir dažas Optimization darīt.

  • § Leave a Reply § Atstāt Atbildēt