One prominent example of this that I seem to notice more often in use than others, is the application of color alternating rows with HTML tables, or also favorably known as the “zebra” effect. Which I’ll be using for my reference material.
1 2 3 4 5 6 7
The for() loop, does the accumulating work. It exponentially raises the default value ($i) by one, each iteration, so that the modulus operator (%) can equate the remainder of $i divided by two. So every instance of an even number represented by $i would evaluate to zero.
Ruby on Rails
1 2 3 4 5
1 2 3 4
The JQuery even and odd filters are used as index selectors. This method can be used on any page element with just a little bit of reverse engineering.
Discovering the Front-End
80% of the average user’s response time is spent on the front-end . This time, is composed of downloading all of the elements necessary to make up the page (Images, libraries, scripts, stylesheets and more). Reducing the number of elements, in turn, reduces the number of HTTP requests required to render the page.
With PHP everything is rendered before any HTTP requests are sent by the server.
Graphically interpreted above are the details associated with load times. This analysis completes the HTTP request cycle from initialization. The darker portion, of each representation, shows the percentage of work involved by the server. As consistency shows, a lot of web design and development, relies mostly on what’s being delivered to the browser.
in order of appearance: Google, PHP Rockstar
It’s certain that a professional web server is going to best the average home network set-up, in performance, any day. It’s your responsibility to take advantage of that, by running some server-side code, to save your guests the frustration of dealing with an idle load time.