Making the most of your webserverGet Web Design Tips and Tricks on mps-web-design.com. Making the most of your webserver topic will increase your understanding on Web Design Tips and Tricks. We at mps-web-design.com only provide news, articles, information in Web Design Tips and Tricks. Web Design Tips and Tricks at mps-web-design.com provides the most up to date news and articles. If you have questions please do not hesitate to contact us.
What happens when your site has a sudden increase in traffic? Great for your business but not for your webserver. A high amount of traffic on a site increases the workload on the server, which means that it might take longer for people to download the site, and can, in a worst case scenario, crash your server, leaving visitors stranded. There are some ways though, to help decrease the amount of work your server has to do. 1. Decrease File Sizes This is probably the easiest to implement. Obviously, the less data the server has to send, the less work it needs to do. If you have graphics that are 800x600 in size, and you only show them as 200x300 on the page, it would be better to decrease their size in an image editing program before using it on the site. You can also remove all unnecessary tag's and comments from web page code. Dreamweaver can actually do this for you at a click of a menu option. You can also download Absolute HTML Compressor to do it at www.download.com (its free). 2. Avoid dynamic pages The next thing to consider is the use of dynamic pages (i.e. php, asp, xml, etc). When a user opens a dynamic page, the web server first has to process the dynamic page code, convert it into HTML, and then send it to the visitors browser (a browser has no idea what php code actually means, only HTML). If you have pages that don't need to offer dynamic info, or don't need special server side processing, then make the page HTML. This will reduce the webservers load. If some processing can be achieved using JavaScript, such as form validation, then use that. JavaScript is processed by a vistors computer, not by the webserver, reducing your servers work load even more. 3. Reuse Everytime you reuse a graphic, instead of adding new ones on each page, the visitors computer, after the first viewing, loads the from its cache. This is also true of CSS. Saving your CSS as an external file, as opposed to emedding CSS markup in each web page, means that after the server loads it the first time, the visitors computer will load it from then on everytime a new page is opened. 4. Reduce database queries Webservers also have to process instructions by your dynamic code to access your database. Obviously then, the more you ask of your databases, the more work the server does. If you ensure that your database queries only ask for information that you will make use of, you can substantially reduce workloads. For example, SQL queries like 'SELECT * FROM table_name' are the worst kind to send, especially if a table is made up of 20 fields and you will only be processing 3 of them. A query like 'SELECT field1, field2, field3 FROM table_name' would then make more sense. Using WHERE in a query to limit the number of records returned also helps. 5. Other advantages Using the above techniques will not only reduce your servers workload, but it also results in less webspace usage, less bandwidth usage and the pages themselves will be quicker to load anyway due to reductions in file sizes, and files loaded by the visitor's cache as opposed to from your server.
This post comes a bit late in the whole web 2.0 cycle. I feel that it bears repeating because I have come across sites that don't follow some basic principles when pulling in 3rd party data from sites such as flickr, twitter et. al. APIs and data portabilityThe blessing of popular and easy to use APIs and the data portability of web 2.0 applications has had an unfortunate side effect, and that is that some implementations that use these services do not integrate appropriate contingency design should these 3rd party services fail. Caching data calls to APIs is a good bit of contingency design. Many APIs will require caching - like that of Amazon - but I suspect this is intended to help limit resource use of the API host, not the site using the API. The reasons a person using API accessed data on their website would want to cache the data are:
A simple implementation to handle those two cases would be one that caches an API call for a given amount of time and one that freshens stale cached data and triggers an error should an API call fail. Caching is good contingency design practiceAs I said above, this post is a bit late to the party but it is worth writing as recently I have come upon at least three sites where firebug and other widgets have revealed issues retrieving API fetched data and the site loading times have been horrible. A decent implementation idea would be to roll your own caching wrapper and agnostically plug it in to a stable caching tool, perhaps something like Cache Lite for PHP. In this manner you have a reusable, caching library independent piece of code that can handle caching/flushing and refreshing of data which could function to handle the two cases discussed above. And that's it. It's been 541 days since my last post. Wow. I hope this is a re-start of a new phase of blogging. Article Index: | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 |
More Articles:1. Build Your Website With A Search Engine Friendly Design By Donald Nelson A good looking and user friendly website is an extremely important asset to your success on the Internet. However without traffic, even a well designed site will not produce results for you. The best websites are those that are both attractive and easy to use by your human users, and at the same time, convenient for the search engine robots that are trying to find and collect data from your site.Oftentimes a site that may look good to your eye has some design flaws that impair its search engin… 2. Does Your Homepage Work? By Peter Simmons All websites have a homepage. It is the most important page of your site. It acts as the main gateway to the entire site. Most of your prospective customers will enter through it. Its vital to get it right. You dont want them to just turn around and go away again.Take a moment to clear your mind. Now go and look at your homepage and take a minute to evaluate it. Does it work for your prospective customers?Most will arrive at your homepage and quickly scan through the content. If they are inter… 3. Ten Fatal Mistakes That Make Web Sites Stink By Herb Leibacher Since you’ll spend lots of time and money to create your web site, don’t you want to make sure you’re not making mistakes that at best irritate users, and at worst make you lose customers?After all, when you alienate users, you lose potential revenue. Who can afford that?Dr. Jakob Nielsen, Principal of the Nielsen Norman Group, says that the top 10 website mistakes include:1. Not listing prices. Pricing in the most specific piece of information users need to understand the nature of offers. By… 4. Why Resources Added to a Web site Increase Revenue! There are literally billions of Web sites online now offering all types of products and services. Some succeed brilliantly, while others fail miserably.There can be many reasons for the failure of some Web sites: poor marketing, poor planning, a weak knowledge of the target market, or just an overall lack of knowledge of business principles by the Web site owner. One shared trait of successful Web sites, however, is the ability and drive to provide good resources to its visitors. This is a tacti… |
||||