Faster a wind - fast html

Well, you already have page? To the schedule, certainly, optimized? Are pleased, probably, with speed zakachki pages on ftp, speed from which they open in a browser? Probably, no. And all because sometimes is necessary to climb in the sanctum - a html-code and slightly to correct it . About it we here also shall lead speech.


Part the first. Optimization of a code


We start liked Notepad and it is opened the page. We also see very beautiful html, carefully formatted manually or different programs that it was read more conveniently, and was edited faster. And at the same time also it loaded more slowly. So, can be at once it is necessary to clean{remove} blanks, tabulation and translations of lines to not be tormented with loading these empty symbols? By much laziness it to do{make}, and it is a pity - speed of the Internet in fact not only on speed of modems depends... Sadly to me, and you as it is not becomes sad, when will open source codes of a couple of the visited sites, and there it is more than emptiness than the text. Also will regret, that in general there came. And to owners of such sites as not sadly is how much the superfluous traffic!


Pogrustiv about an empty place, we shall pass to a place to less empty - to comments in a code. Though also it would be desirable to insert <! - Copyright (c) by Pupkin Inc.->, but can, does not cost - a little to us, to simple visitors of your site, reading of your interesting text and contemplation of beautiful pictures to estimate riches and eccentricity of your creative nature? Well, and if an inscription <! - here the table for navigation-> it is necessary, that you after a while could recollect, what for there at you a tag


<table> and everyones



<td> <a href = "d.htm"> download </a> </td>

<td> <a href = "l.htm"> links </a> </td>


That that here is possible to say? From a sclerosis vegetables help. And more: if will meet advice{council} to register keywords in comments - do not believe.


Now about typical neracional`nostjakh a code. Such irrationality are rare at manual input html, but in connection with universal using FrontPage and to him similar softin they meet continually. The most widespread excess is curve use of a tag font. For example:


<font face = "Courier"> <font size = "3"> the Text </font> </font>


Instead of


<font face = "Courier" size = "3"> the Text </font>


But it still anything, is much worse, when the visual editor gives out nothing to the suspecting author a similar pearl:



<font face = "Courier"> Tekst1 </font>

<font face = "Courier"> Tekst2 </font>

<font face = "Courier"> Tekst3 </font>


Instead of simple



<font face = "Courier"> Tekst1 Tekst2 Tekst3 </font>


Especially on a tag font sin old versions FrontPage. and so. And in fact many fans{amateurs} of this program also do not suspect... By the way, <font> I for the first time have found out such use in the initial text of page which just for this most FrontPage and agitated.


Before making out pages tags <font> reflect: instead of whether easier to use css? Thanking css it is possible to reduce the size of each page, removal of heading css as a separate file will reduce the total size of a site. But here it is necessary more difficultly. In fact if and html <with the dictionary> where there css to learn{teach}!


The tag font is, certainly, half-troubles. Visual editors in general give out weight of a superfluous code: thoughtlessly register width (width) and height (height) tables and cells (often even the height can be removed), sometimes add superfluous blanks at the end of a tag or in the middle (such it is possible and at manual input of a code):



<p> The paragraph </p>,

<p> Tekst1 Tekst2 </p>,


Quite often repeat alignment:



<td align = "center">

  <div align = "center">

   <center>

     <p align = "center"> the Paragraph on the center </p>

   </center>

  </div>

</td>


Inverted commas, by the way, too can be cleaned{removed}. All programs - editors put them where popadja though actually inverted commas are necessary only in attributes alt and href, and also in meta-tags.


Has recollected, as in meta-tags quite often there are excesses. An excess will be too long list of keywords (keywords), and also the vast description (description) a site. Search the server and catalogues do not like talkers therefore to the list of words should not exceed length in 1000 symbols, and to the description - 200 symbols. By the way, some <search engines> in general ignore such meta-tags, and all poiskoviki as having agreed, ignore data on the author (author), the program - editor (generator) and to that the similar information. So, if used visual editors remove the lines similar



<meta name = "GENERATOR" content = " Microsoft FrontPage 4.0">

<meta name = "ProgId" content = " FrontPage. Editor. Document ">


At the same time and a shame among professionals will avoid.


In the initial text of any page a lot of place borrow{occupy} names of files - inserted a picture, the link to other pages of a site, the reference{manipulation} to external css. To burden a site, on each page repeatedly addressing to a picture under the name my_new_website_logo2001.gif, certainly, unreasonably. Besides, as many pictures, stored{kept} in one separate folder - often Images simple its{her} renaming in Im or I will very essentially reduce the sizes of a site are usual on pages. Other folders to name, certainly, too it is necessary with mind{wit}.


Now we shall see whether better to refuse some java-scripts. At viewing amateur sites sometimes it seems, that all of them somehow not so correctly estimate quality of memory and a degree of sobriety of the visitor, constantly reminding, what today day. Founders of the some people sites obviously scoff at the visitor, showing him snowfall or a leaf fall and preventing thus to reading of the text. And that similar nonsenses without which any normal site will fine cost cost{stand} changing title or statusnaja a line of a browser and to that. Scripts brake not only loading, but also opening of page by a browser, but about it just in the second part to which we came closely.


Part the second. Acceleration


How to make so that a browser opened page or its{her} basic part as it is possible more quickly i.e. that the visitor at once has seen that, what for has come. Perhaps, here and there it is necessary to increase a code of page, but it of that costs{stands}.


Let's start with tables, in fact on them invisible, the design of the majority of sites keeps. The browser cannot open the table, not having loaded her  completely, therefore it is better to break the basic table of page into some separate tables. Advice{council} very effective also is very widely applied by professionals. In fact to make it it is simple, and the effect is obvious.


Let's pass to pictures. Browsers store{keep} all loaded figures in special to a folder - a cache - and at repeated loading figures pick up them therefrom. Therefore on different pages it is impossible to use identical figures from different catalogues. A correct variant - to throw off all images in one folder - as it was already spoken, it is the best way with name Im or I. By the way, necessarily register attributes width and height a tag <img>. Only thus it is possible to give a browser the information on that, how much pixels are necessary to allocate for a picture, in fact differently at podgruzke each new image all already open content on page will be shifted.


Because of an opportunity parallel zakachki pictures in modern browsers it turns out, that one big picture will be loaded in 40 KB more slowly, than four pictures on 10 KB. Cut big a picture and feel a difference. But it is not necessary to cut on too many small pieces, the return result - a browser in parallel zakachivaet the certain number of files differently will turn out, and to you it will turn out badly: present, what to organize all this mosaic in a code of page! And present, how much places ten tags <img> with all their attributes can borrow{occupy}, plus the table for accommodation of pictures. And more, at the correct approach to cutting it is possible to reduce the total size - it is possible to replace a picture in 40 KB several, borrowing{occupying} in the sum it is much less. How? Very simply - cut reasonably, knowing, that is possible to reach{achieve} reduction of the size of each separate piece reduction of quantity{amount} of colors (gif) or reduction of quality (jpeg).


Extremely zatormazhivajut opening of page banners and counters. Servers from which they are loaded, often are slow in themselves, are in addition constantly overloaded. But here already nothing can be done{made} unless to be limited to one counter and one - two banners on each page.


By the way about counters. If not want to brake thoroughly opening of page do not follow recommendations of various ratings on installation of the counter at the top of page. The counter (even odnopiksel`nyj, in fact not in a picture business) always put below.


Let's think once again, whether some scripts on pages of your site are necessary. Whether impressions of the visitor from any primitive timer of that money which he should spend for a while his  loadings and opening cost{stand}? Especially if to recollect, that in all modern operational systems there is a timer, all habitual and on all a habitual place... In general, java-scripts professional seldom use the web designer. Sometimes realize effect perekatyvanija images (rollover effect), sometimes (is $more often on the western sites) do{make} the dropping out menu. And all...


Part the third. Last


For the sake of justice it is necessary to note, that there are programs of compression of pages, but for the sake of the same validity shall notice, that any of them does not correspond{meet} to the stated requirements to the full. As a rule, programmers of these programs seldom afford something the greater, rather than simple removal{distance} of formatting of a code or cleaning html, generated Word'om. And intervention in the code neither the good web designer, nor bad FrontPage:-) does not like.


Well, in the beginning I pogrustil, now, hope, I can be glad, if pages of your site under my sensitive management{manual} began less and faster. You indeed will please any visitor if he will see, that the site is good not only the maintenance{contents} and a kind, and and is fast gruzitsja. Itself will please first of all - less kilobyte should be driven on ftp, and to test more pleasantly.