Mobile app version of mncguru.com
Login or Join
BusinessbazeeCoders

: 11 tips to Survive the digg effect! Digg has grown into an immensely popular social website, and most webmasters post their content to digg to get traffic to their websites and blogs. The traffic rush can be so high that

@BusinessbazeeCoders

Posted in: #Web-Design-And-Development #Traffic #Digg #Survive #Tips #Fast #Process #High-Traffic-Survive

11 tips to Survive the digg effect!
Digg has grown into an immensely popular social website, and most webmasters post their content to digg to get traffic to their websites and blogs. The traffic rush can be so high that it can use all the bandwidth allotted to you in 2 days, eat up all your server resources, ultimately resulting in a failure to load your website completely.

Fortunately, you can take measurable steps to survive the "Digg effect". This article covers tips for webmasters who use dynamic pages, cannot tune their web server, and it's not required as well until you post to digg multiple times a month... A simple website tuning will do the work for you!

A special tip: Not having something interesting will also survive the effect...
Ok, Ok, Ok, don't look at me like that, here come the tips.

1. Avoid using wordpress blogs. Wordpress uses multiple mysql queries to load 1 single page. This number can go as high as 15 to 17 queries. Wo, that's a lot to load 1 page... And if it's a wordpress blog, caching would be a good idea

2. Never place a query inside a loop. When this loop runs, the query runs along, putting extra load on your mysql. Run the query outside the loop, get the results in an array, and a little programming to display the output. The Businessbaazee Article CMS uses this technique.

This is also safer in general terms, specially if query is based on user input.

3. Store the general settings in a simple PHP file, instead of putting them in a database. Use a simple "require_once", or "include" command to get these values. Remember too many includes can also exhaust your server. Placing most of the variables in 1 file and all functions in another file is redable, and uses only 2 require or include commands.

Avoid using includes inside a file which is already being included and so on...

4. When selecting from a database, avoid selecting the entire row. Select only the fields which you need. This saves you memory and speeds up the execution.

5. Make good use of LIMIT. If you want only 1 row, or a specified number of rows, limiting the query to that number speeds up the execution time.

6. Don't select the entire table if you don't really need it. Use WHERE parameters to select only the rows required. A combination of LIMIT and WHERE will result in enhanced performance.

7. Never use "absolute links" to call images, or style sheets placed under your same host account. Use relative links instead. Absolute links would be www.ad4business.com/index.php . Relative link is "index.php". Relative linking also caches the files, so in case of a refresh, the style sheet is not downloaded again.
Note: A forced refresh downloads the entire page and sub files again.

8. Use a Content Accelerator for faster processing. (A google search link.)

9. Validate any input. Wrong input can lead to hacking, or in cases a complete server crash. Stop the execution of the script if the input is not as expected. This will free the server for other requests.

10. Use DIE command in case of mysql errors. This prevents scripts from running even though there's an error in output served by database, again letting the server handle other requests.

11. If using CMS, or softwares developed by other companies, make sure to use the latest versions. These will have bug fixes, and would be optimized for better performance.

Finally, If possible, use static pages when posting to digg.
PHP coders at www.businessbaazee.com . The link must be kept as is to use this article on your blogs.


best stocks under 100 TBR jar read books Money systematic investment planning cheers

10% popularity Vote Up Vote Down

0 Reactions   React


Replies (0) Report

Login to follow topic

0 Comments

Sorted by best first Latest Oldest Best

Back to top | Use Dark Theme