IT Community - Software Programming, Web Development and Technical Support

Website Performance Tips & Tricks

This is a discussion on Website Performance Tips & Tricks within the Web Design Help forums, part of the Web Development category; Things to do,to make web sites faster There are some well-known general best practices you can follow to ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > Web Design Help

Register FAQ Members List Calendar Mark Forums Read
  #81 (permalink)  
Old 08-25-2007, 03:30 AM
venkatbi venkatbi is offline
D-Web Programmer
 
Join Date: Jul 2007
Posts: 80
venkatbi is on a distinguished road
Default Re: Website Performance Tips & Tricks

Things to do,to make web sites faster

There are some well-known general best practices you can follow to overcome some of these technical and human factors and ensure a quick response web site:

* Optimize all the HTML and dependencies as much as you can without losing quality (this can include stripping the HTML documents of any comments and superfluous linebreaks, which should be part of the publication process. In order to keep sites maintainable you still need those in the source documents)
* Reduce dependencies by using the least amount of file includes (collate several scripts into one include, use CSS sprite techniques to load all images at once)
* Make sure that you don’t include third-party content from their servers: set up a script that caches RSS feeds locally and use that one instead. The benefit is not only that you don’t have to deal with the DNS server delays but you are also independent of the other server should it go down.
* If possible, define dimensions for images and their container elements. This will ensure that the first rendering of the page will be correct and there won’t be any “jumping around” when the images are loading.
* Include large dependencies such as massive scripts at the end of the document, as this means that the rest of the page gets shown before the browser loads them. Large JavaScript includes in the head of the document mean that the browser waits with rendering until they are loaded.

thanks,
venkatbi
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #82 (permalink)  
Old 08-25-2007, 04:02 AM
vijayanand vijayanand is offline
D-Web Analyst
 
Join Date: Feb 2007
Posts: 293
vijayanand is on a distinguished road
Default Re: Website Performance Tips & Tricks

Website Performance Tips

Image Related - I:
  • Reduce the size of images by reducing the number of colors. Optimize your images with online tools like GifWorks (GIFWorks.com! Free Online GIF Tools).
  • Reduce the size of images by reducing its dimensions. Cropping images, also known as relevance-enhancing, can reduce size and also help focus the attention of the quick eye of the web surfer.
__________________

J.Vijayanand
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #83 (permalink)  
Old 08-25-2007, 04:03 AM
venkatbi venkatbi is offline
D-Web Programmer
 
Join Date: Jul 2007
Posts: 80
venkatbi is on a distinguished road
Default Re: Website Performance Tips & Tricks

Keep Cookies Small

Your cookie is sent back to your server every single time the user makes a request for anything. Even with Images, JS, CSS requests or AJAX the cookie is sent. A typical HTTP request will have between 500-1000 bytes. Now, if you have 4 cookies each with names like "user_name" followed by a value with 30 characters, you are adding 15-30% more bytes to the request.


thanks,
venkatbi
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #84 (permalink)  
Old 08-27-2007, 12:35 AM
vijayanand vijayanand is offline
D-Web Analyst
 
Join Date: Feb 2007
Posts: 293
vijayanand is on a distinguished road
Default Re: Website Performance Tips & Tricks

Website Performance Tips:

Image Related - II
  • Use the jpg format for photos. Jpeg compression is known for its exceptional compression abilities with regard to photos. Many tools, such as ACDSee (ACDSee Photo Software) can easily convert images from one format to another and allow you to set the compression level for jpeg images.
  • Reduce the total number of images on one page. Most web browsers download up to 4 images concurrently; however, each connection adds to the overall response/load time.
  • Reuse images whenever possible to take advantage of server-side (web server) and client-side (browser) caching.
__________________

J.Vijayanand
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #85 (permalink)  
Old 08-27-2007, 02:41 AM
velhari velhari is offline
D-Web Programmer
 
Join Date: Mar 2007
Location: Chennai
Posts: 67
velhari is on a distinguished road
Send a message via AIM to velhari
Default Re: Website Performance Tips & Tricks

Splitting up long pages:-
If a page has very vast number of data's, better thing is to split up into multiple pages. Because, the load time for a long page is larger and it shows some blank screen until the page loads fully. So, by splitting up the long page into multiple pages,loading the page faster, and it attracts the user seeing that page.
__________________
Regards,
VELHARI
I am not totally useless. I can be used for a bad example
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #86 (permalink)  
Old 08-27-2007, 04:33 AM
venkatbi venkatbi is offline
D-Web Programmer
 
Join Date: Jul 2007
Posts: 80
venkatbi is on a distinguished road
Default Re: Website Performance Tips & Tricks

Avoid Tables (or use fixed-layout tables):

Rendering a table is probably the worse nightmare for a browser. If the browser starts showing the table before all the content inside it is loaded, the browser's rendering engine will have to re-render it many times as each piece is loaded. On the other hand, if the browser needs to wait for everything to be loaded, the user we see a blank page (or partially blank) for a few seconds. Browser's usually use a combination of both to reduce the number of re-renderings without leaving the user hanging in there. The point is, don't make your whole page start with a table. It is preferrable to have 3 tables (header, body, footer). Whenever possible, just avoid using tables altogether.

And, better yet, set the default CSS properties of all tables to fixed-layout:

table { table-layout: fixed }

If you do that, you must sure that you always set the table width and the columns width.

thanks,
venkatbi
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #87 (permalink)  
Old 08-27-2007, 04:46 AM
venkatbi venkatbi is offline
D-Web Programmer
 
Join Date: Jul 2007
Posts: 80
venkatbi is on a distinguished road
Default Re: Website Performance Tips & Tricks

Watch for Memory Leak

The biggest problem with browser's memory leak is that it doesn't affect only the page that created the leak, it affects every single page from any site after that. Internet Explorer is notorious for its massive memory leaks (becase of poor JavaScript). There are a few tools on the Internet to find out if your script is causing memory leak and where. The easiest test is to load your page 100 times and watch PerfMon to see if the Working Set is growing or not. The most simple thing that you should do is to unbind every event that you bound to (dynamically), and to release every reference possible (this also helps the JavaScript garbage collector to be faster).

thanks,
venkatbi
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #88 (permalink)  
Old 08-27-2007, 05:01 AM
venkatbi venkatbi is offline
D-Web Programmer
 
Join Date: Jul 2007
Posts: 80
venkatbi is on a distinguished road
Default Re: Website Performance Tips & Tricks

Using Memcache

There are lots of ways to scale a web application, from throwing hardware at it, to optimizing database queries. I’ve been hearing a lot, however, about a software program called Memcached.

When to use Memcached

Memcached is great for dynamic database driven websites that retrieve data again and again from a database. Reading the same data over and over again from the database is a waste when you can store it in memory and use it from there. Even if the data gets updated fairly often, storing a cached version in memory for only 10 seconds can be highly effective if you get several pageviews during that period of time. And unless someone is saving data (at which point you’d automatically update the cache), nobody is going to notice that the data is 10 seconds delayed.

thanks,
venkatbi
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #89 (permalink)  
Old 08-27-2007, 08:17 AM
vijayanand vijayanand is offline
D-Web Analyst
 
Join Date: Feb 2007
Posts: 293
vijayanand is on a distinguished road
Default Re: Website Performance Tips & Tricks

Website Performance Tips:

Image Related - III
  • Specify image WIDTH and HEIGHT attributes for faster loading in the browser.
  • Combine images and use image maps instead of segmenting images, remembering that each image loaded is a connection between the web browser and the web server.
  • Use image ALT attributes sparingly. Each character adds to the size of the web page and to the load time.
__________________

J.Vijayanand
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #90 (permalink)  
Old 08-27-2007, 08:21 AM
vijayanand vijayanand is offline
D-Web Analyst
 
Join Date: Feb 2007
Posts: 293
vijayanand is on a distinguished road
Default Re: Website Performance Tips & Tricks

Website Performance Tips:

HTML Related - I
  • Use comments sparingly. While invisible when a web page is loaded in a browser, the comments are still transferred from the web server, needlessly wasting bandwidth.
  • Avoid unnecessary HTML tags: not all tags need a closing tag. For example, it is not necessary to have a close or tag.
__________________

J.Vijayanand
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #91 (permalink)  
Old 08-27-2007, 08:58 AM
vijayanand vijayanand is offline
D-Web Analyst
 
Join Date: Feb 2007
Posts: 293
vijayanand is on a distinguished road
Default Re: Website Performance Tips & Tricks

Website Performance Tips:

HTML Related - II

  • Optimize your HTML code with free online tools such as iWebTool (http://www.iwebtool.com/html optimizer) to reduce the overall size of the html file.
  • Avoid using frames. Each frame loads its own web page which can increase the overall response time of a webpage.
__________________

J.Vijayanand

Last edited by vijayanand : 08-28-2007 at 12:53 AM.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #92 (permalink)  
Old 08-28-2007, 12:54 AM
vijayanand vijayanand is offline
D-Web Analyst
 
Join Date: Feb 2007
Posts: 293
vijayanand is on a distinguished road
Default Re: Website Performance Tips & Tricks

Website Performance Tips:

HTML Related - III

  • Minimize the amount of text and sub-tags between the HEAD open and close tag.
  • Place external JavaScript tags, i.e. with src=??? someurl ???, at the end of the document to delay loading.
  • Simplify tables and avoid nested tables (tables within tables).
__________________

J.Vijayanand
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #93 (permalink)  
Old 08-28-2007, 03:18 AM
vijayanand vijayanand is offline
D-Web Analyst
 
Join Date: Feb 2007
Posts: 293
vijayanand is on a distinguished road
Default Re: Website Performance Tips & Tricks

Website Performance Tips:

HTML Related - IV

  • In tables use background colors instead of images.
  • Avoid using WYSIWYG editors, e.g. FrontPage, that include extra and irrelevant text and HTML tags. Learn to edit HTML code by hand.
__________________

J.Vijayanand
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #94 (permalink)  
Old 08-28-2007, 03:19 AM
vijayanand vijayanand is offline
D-Web Analyst
 
Join Date: Feb 2007
Posts: 293
vijayanand is on a distinguished road
Default Re: Website Performance Tips & Tricks

Website Performance Tips:

Database Related

  • Use SQL Server or another professional level database over Access.
  • Use stored procedures over simple SQL queries.
  • Connection Pooling - ensure connection pooling is enabled by using a DSN (Data Source Name) in the ODBC Data Source Administrator.
__________________

J.Vijayanand
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #95 (permalink)  
Old 08-28-2007, 03:22 AM
vijayanand vijayanand is offline
D-Web Analyst
 
Join Date: Feb 2007
Posts: 293
vijayanand is on a distinguished road
Default Re: Website Performance Tips & Tricks

Website Performance Tips:
  • Reduce the use of global variables.
  • Reduce the number of include files used on a page. Also, segment and categorize functions in commonly used include files.
  • Be careful of string concatenation as the size of the string grows. As the string grows through concatenation, it is copied to a new location in memory each time.
  • Set objects, especially database objects to Nothing when no longer needed
__________________

J.Vijayanand
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #96 (permalink)  
Old 08-28-2007, 03:46 AM
vijayanand vijayanand is offline
D-Web Analyst
 
Join Date: Feb 2007
Posts: 293
vijayanand is on a distinguished road
Default Re: Website Performance Tips & Tricks

Website Performance Tips
  • Keep blocks of scripts together. Each switch between scripts and HTML causes the compiler to stop and start processing.
  • Don't use script commenting: which is compiled each time the page is loaded. Instead, use HTML commenting or no commenting at all.
  • Utilize background processing to help with long running tasks. Create multi-threaded operations when possible and feasible.
__________________

J.Vijayanand
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #97 (permalink)  
Old 08-28-2007, 04:36 AM
venkatbi venkatbi is offline
D-Web Programmer
 
Join Date: Jul 2007
Posts: 80
venkatbi is on a distinguished road
Default Re: Website Performance Tips & Tricks

performance tips:
If you have made efforts to boost the performance by optimizing your queries and your application code, there are number of server-level and language-level tunings for high-traffic websites (OS, MySQL, hardware related) that you (or your host admin) can try to ensure that an application performs at its best.

*Use the latest stable MySQL version. There are enough things that run faster on MySQL 4.x and later versions (improved SQL query optimizer behaviour, query cache if enabled, SQL_CALC_FOUND_ROWS option, full-text indexing, more efficient SQL syntax in some cases, etc.,

thanks,
venkatbi
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #98 (permalink)  
Old 08-29-2007, 03:15 AM
ramkumaraol ramkumaraol is offline
D-Web Programmer
 
Join Date: Jul 2007
Posts: 98
ramkumaraol is on a distinguished road
Default Re: Website Performance Tips & Tricks

Avoid Redirects

Redirects are accomplished using the 301 and 302 status codes. Here's an example of the HTTP headers in a 301 response:

HTTP/1.1 301 Moved Permanently
Location: http://example.com/newuri
Content-Type: text/html

The browser automatically takes the user to the URL specified in the Location field. All the information necessary for a redirect is in the headers. The body of the response is typically empty. Despite their names, neither a 301 nor a 302 response is cached in practice unless additional headers, such as Expires or Cache-Control, indicate it should be. The meta refresh tag and JavaScript are other ways to direct users to a different URL, but if you must do a redirect, the preferred technique is to use the standard 3xx HTTP status codes, primarily to ensure the back button works correctly.

The main thing to remember is that redirects slow down the user experience. Inserting a redirect between the user and the HTML document delays everything in the page since nothing in the page can be rendered and no components can start being downloaded until the HTML document has arrived.

One of the most wasteful redirects happens frequently and web developers are generally not aware of it. It occurs when a trailing slash (/) is missing from a URL that should otherwise have one. For example, going to http://www.discussweb.com/web-design-help results in a 301 response containing a redirect to http://www.discussweb.com/web-design-help/ (notice the added trailing slash). This is fixed in Apache by using Alias or mod_rewrite, or the DirectorySlash directive if you're using Apache handlers.

Connecting an old web site to a new one is another common use for redirects. Others include connecting different parts of a website and directing the user based on certain conditions (type of browser, type of user account, etc.). Using a redirect to connect two web sites is simple and requires little additional coding. Although using redirects in these situations reduces the complexity for developers, it degrades the user experience. Alternatives for this use of redirects include using Alias and mod_rewrite if the two code paths are hosted on the same server. If a domain name change is the cause of using redirects, an alternative is to create a CNAME (a DNS record that creates an alias pointing from one domain name to another) in combination with Alias or mod_rewrite.

Thanks,
Ramkumar.B
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #99 (permalink)  
Old 08-29-2007, 09:37 AM
vijayanand vijayanand is offline
D-Web Analyst
 
Join Date: Feb 2007
Posts: 293
vijayanand is on a distinguished road
Default Re: Website Performance Tips & Tricks


Website Performance Tips:

IIS Tricks

  • Use server side compression software such as Port80???s httpZip (httpZip for IIS Compression, Acceleration & Bandwidth :: Port80 Software)
  • Use GZip compression to reduce bandwidth, but be aware that CPU utilization may go up. A-B testing can help you find the right balance of whether GZip compression is right for your website.
  • Use IIS 6.0, which includes significant performance enhancements such as Kernel Caching.
__________________

J.Vijayanand
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #100 (permalink)  
Old 08-29-2007, 09:39 AM
vijayanand vijayanand is offline
D-Web Analyst
 
Join Date: Feb 2007
Posts: 293
vijayanand is on a distinguished road
Default Re: Website Performance Tips & Tricks


Website Performance Tips:

IIS Tricks - II

  1. Don t install or use Microsoft Index Server unless you need it. The cost far outweighs the benefits that Index Server will give.
  2. Don t enable logging unless needed. Logging is disk and resource intensive.
  3. Run IIS "in-process" if the website is mostly static. Mostly dynamic or unstable websites should not use this setting.
__________________

J.Vijayanand
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

LinkBacks (?)
LinkBack to this Thread: http://www.discussweb.com/web-design-help/3182-website-performance-tips-tricks.html
Posted By For Type Date
comp.theory | Google Groups This thread Refback 09-15-2007 12:21 AM
Perfomance Tunning - comp.theory | Google Groups This thread Refback 09-06-2007 10:16 PM
Mortgage Calculators - calculators mortgage leads, cost calculators mortgage This thread Refback 09-06-2007 09:43 PM
Web Link This thread Refback 09-06-2007 02:38 AM
Discussions - comp.theory | Google Groups This thread Refback 09-05-2007 02:17 AM
comp.theory | Google Groups This thread Refback 09-05-2007 01:19 AM