Code and resource optimization
The number one optimization rule is that it should only appear after the program is running and meets the functional specifications. Experience shows that applying low-level code optimizations before these two conditions are met is most often a waste of time and is detrimental to code clarity and the proper functioning of the program:
In general, while writing a code, low-level local optimizations (rewriting in assembly, undoing loops, etc.) can be left out. It is possible to interpret this quote by deducing from it that high-level optimizations regarding the choice of algorithms or the architecture of a project must come before the low-level one. So, only towards the end of writing the program, once the analysis shows that a low level of detail is essential, it may be necessary to change it in the end.
To monitor the effectiveness of an optimization, the developer relies on performance tests, ie objective measurements of processing time and allocated memory size.
Reducing the size of resident data in memory is complex because releasing a memory area rarely makes memory available to the operating system.
Algorithmic optimization consists in applying successive mathematical transformations in code that keep the specifications of the program, while reducing resource consumption.
Optimizations using language tools
Using different functions or even different complete libraries, you can optimize the program.
Minimize html code that is useless for search engines. The basic rule is: the less html code there is on the page, and the more content (text) is present - the better. The ratio between content and html code must be as high as possible. That's why tables are not welcome (for layout).
Minimizing the html code also reduces the page size. Thus, in addition to the fact that the waiting time of the visitor is significantly reduced, and the consumption of traffic is reduced. Clean html / css code is much more accessible for handhelds: mobile phones, PDAs, etc. Maintaining such code is simpler and more convenient.
Semantic (correct) use of HTML tags
Among the most important tags on the page are: title / title and h1 - h6 . Search engines place great value on the keywords in these tags.
- The title tag must contain the title of the PAGE, not the site. It is recommended that a title contain between 3 and max. 6 words.
- The tags h1 h2 h3 h4 h5 h6 are "headings", ie sub-titles. Their importance decreases from h1 to h6. Thus, if we have a page (like this) that is separated into several logical parts, it is correct to use these headings.
Many designers and especially developers forget about an important segment of the Internet, namely users with visual disabilities, users who have blocked the download of images in the browser, users browsing PDAs and mobile phones, etc. So, the conclusion: the image must not contain vital information for the site, such as product prices, contact phone, etc.
Presentation of a Sitemap
It is recommended that any site that has more than 5-10 pages, these being organized in several levels, to present a sitemap (site map). For example, if you have a personal page with about 3-4 pages, all of which are directly accessible from the first page, you do not need a sitemap. If you have a larger site, where you have a navigation by categories, subcategories, etc. (several levels), a site map is very welcome. It is also recommended that the map does not contain more than 50-60 links. So, if you have a forum, for example, it is not recommended that the map contain all the posts on the forum, just the pages with categories and topics.