go to  ForumEasy.com   
JavaPro
Home » Archive » Message


[Email To Friend][View in Live Context][prev topic « prev post | next post » next topic]
  Trick #2 KeepAlive benefits the first-time visitors the most
 
Subject: Trick #2 KeepAlive benefits the first-time visitors the most
Author: EricJ
In response to: Practical results show that the trick #1 is mazing
Posted on: 10/05/2012 03:53:14 PM

Here what I put:

KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15


Here what I got:
+--------------------------------------------------------------------+
|                  |              |  Time   | Connections | Bytes In |
+--------------------------------------------------------------------+
|  Before trick #2 |  First View  |  1.470s |     11      |  130 KB  |
|  After  trick #2 |  First View  |  1.263s |      6      |  130 KB  |
+--------------------------------------------------------------------+


Observations:
  • The connections used to grab all the components (gif,css,etc) of the first webpage has dropped from 11 to 6;
  • The speed says it all by witnessing 1.263s vs. 1.470s.

    Conclusion: While the trick #1 (taking advantage of cache) benefits the users from the repeat views, the trick #2 Keep-Alive benefits the first-time visitors the most. That is also a critical factor for website to gain better user experience for the first-time visitors. Survey reveals that first-time visitors to a new website tends to run away very quickly from it if its first page is too slow to load.

    "Your website has about 3 seconds to take a good impression, otherwise 40 percent visitors will just leave. The worst is that they will never come back again."


     

    > On 10/05/2012 03:08:18 PM EricJ wrote:

    Just applying the trick #1 "Take advantage of caching to save the trips for static contents", most pages of my website are already triple faster. Here is what I put:
    <IfModule mod_expires.c>
    
        ### activate mod_expires
        ExpiresActive On
    
        ### Expire ALL IMAGES 1 month from when they're accessed
        ExpiresByType image/* A2592000
    
        ## Expire .css's 1 month from when they're accessed
        ExpiresByType text/css "access 1 month"
    
        ### Expire everything else 1 day from when it's last modified
        ExpiresDefault "modification plus 1 day"
    
        ### Apply a Cache-Control header to index.html
        <Files index.html>
            Header append Cache-Control "max-age=3600, must-revalidate"
        </Files>
    
    </IfModule>
    


    Here is what I got:
    +-----------------------------------------------------------------+
    |                  |              |  Time   | Requests | Bytes In |
    +-----------------------------------------------------------------+
    |  Base line       |  First View  |  1.470s |    11    | 130 KB   |
    |-----------------------------------------------------------------|
    |  Before trick #1 | Repeat View  |  1.001s |    11    |   2 KB   |
    |  After  trick #1 | Repeat View  |  0.122s |     0    |   0 KB   |
    +-----------------------------------------------------------------+
    


    Observations:
  • The trips from client to server in order to form the webpage (gif,css,etc) has dropped significantly from 11 to 0.
  • Even though the repeat view trips bring essentially no pay-load but 304 Not Modified, as evidenced by 2 KB, the useless trips still takes decent amount of time to bother the server.
  • The speed says it all by witnessing 1.001s vs. 0.122s.

    Conclusion: Trick #1 "Take advantage of caching" is a win-win situation for both user and server: user feels much faster whileas server saves a lot of bandwidth.





    References:

  •  


     
    Powered by ForumEasy © 2002-2022, All Rights Reserved. | Privacy Policy | Terms of Use
     
    Get your own forum today. It's easy and free.