Help Required to reduce website load time

Reply

Join Date: Apr 2009
Posts: 37
Reputation: shefeekj has a little shameless behaviour in the past 
Solved Threads: 2
shefeekj shefeekj is offline Offline
Light Poster

Help Required to reduce website load time

 
0
  #1
Apr 28th, 2009
HI,
I am developing a new website..The design is sowhat over .My problem is its taking too much time to load.I need a very simple interface but i ended up in this bottle neck .I used jquery to add some effects ..

Do u have any suggestion to reduce the page load time or any suggestion in making the site more interactive

the link to the page is http://www.shefeekj.com/WhiteLove/
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 1,478
Reputation: cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about 
Solved Threads: 136
cwarn23's Avatar
cwarn23 cwarn23 is offline Offline
Nearly a Posting Virtuoso

Re: Help Required to reduce website load time

 
0
  #2
Apr 28th, 2009
Usually for a page to take that long to load, it is due to one or more loops taking too long to process or even a slow mysql server. So post the script for index.php and I will check what modifications need to be done.
Try not to bump 10 year old threads as it can be really annoying.
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 37
Reputation: shefeekj has a little shameless behaviour in the past 
Solved Threads: 2
shefeekj shefeekj is offline Offline
Light Poster

Re: Help Required to reduce website load time

 
0
  #3
Apr 28th, 2009
here is the code for the page.php .... its in called in an iframe from index.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Cool AJAX MENU</title>
<script type="text/javascript" src="niftycube.js"></script>
<script src="jquery.min.js" type="text/javascript"></script>
<script>
// When the document loads do everything inside here ...
$(document).ready(function(){
Nifty("#menu a","small top transparent");
Nifty("#outcontent","medium bottom transparent");
$('.content').load('boo.php'); //by default initally load text from boo.php
$('#menu a').click(function() { //start function when any link is clicked
$(".content").slideUp("slow");
var content_show = $(this).attr("title"); //retrieve title of link so we can compare with php file
$.ajax({
method: "get",url: "boo.php",data: "page="+content_show,
beforeSend: function(){$("#loading").show("fast");}, //show loading just when link is clicked
complete: function(){ $("#loading").hide("fast");}, //stop showing loading when the process is complete
success: function(html){ //so, if data is retrieved, store it in html
$(".content").show("slow"); //animation
$(".content").html(html); //show the html inside .content div
}
}); //close $.ajax(
}); //close click(
}); //close $(
</script>
<style type="text/css">
body { margin:0 auto 0 auto; color:#000; font-family:Georgia, "Times New Roman", Times, serif; font-size:16px; background-color:#666666; }

.page { margin:100px auto 0 auto; width:750px;}

#menu { list-style:none; margin:0px; padding:0px;}

#menu li { list-style:none; display:inline; }
li.active a { background-color:#FFF;color:#000; }

#menu li a,#menu li a:link { float:left; background-color:#3c3c3c; margin-right:5px; padding:7px; color:#FFFFFF; text-decoration:none; width:6em; text-align:center;}
#menu li a:visited { }
#menu li a:hover { background-color:#327cc8 }
#menu li a:active { background-color:#FFF;color:#000; }



.content {
background-color:#FFF; background:url(ajaxinterface.jpg) bottom right no-repeat; padding:10px; height:300px; margin:0px; }

#loading { clear:both; background:url(wait.gif) center top no-repeat; text-align:center;padding:33px 0px 0px 0px; font-size:12px;display:none; font-family:Verdana, Arial, Helvetica, sans-serif; }

#outcontent {clear:both; background-color:#FFFFFF; }

</style>
</head>

<body>

<div>
<ul id="menu">
<li id="Back"><a href="" title="about">Page Rank</a></li>
<li id="portfolio"><a href="#" title="portfolio">Back Link</a></li>
<li id="contact"><a href="#" title="contact">WHOIS</a></li>
<li id="keyword"><a href="#" title="keyword">Keyword</a></li>
<li id="meta"><a href="#" title="meta">Meta</a></li>

</ul>
<br style="clear:both;" />
</div>
<div id="outcontent">
<div id="loading">LOADING</div>
<div class="content"></div>

</div>
</body>
</html>
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 1,478
Reputation: cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about 
Solved Threads: 136
cwarn23's Avatar
cwarn23 cwarn23 is offline Offline
Nearly a Posting Virtuoso

Re: Help Required to reduce website load time

 
0
  #4
Apr 28th, 2009
I have just checked the code and although the html is fine an all the ajax is a real mess. I think the following section will need a rewrite and although it is hard to see what this piece of code does, I think some tutorials might help find a better way of doing it.
  1. <script>
  2. // When the document loads do everything inside here ...
  3. $(document).ready(function(){
  4. Nifty("#menu a","small top transparent");
  5. Nifty("#outcontent","medium bottom transparent");
  6. $('.content').load('boo.php'); //by default initally load text from boo.php
  7. $('#menu a').click(function() { //start function when any link is clicked
  8. $(".content").slideUp("slow");
  9. var content_show = $(this).attr("title"); //retrieve title of link so we can compare with php file
  10. $.ajax({
  11. method: "get",url: "boo.php",data: "page="+content_show,
  12. beforeSend: function(){$("#loading").show("fast");}, //show loading just when link is clicked
  13. complete: function(){ $("#loading").hide("fast");}, //stop showing loading when the process is complete
  14. success: function(html){ //so, if data is retrieved, store it in html
  15. $(".content").show("slow"); //animation
  16. $(".content").html(html); //show the html inside .content div
  17. }
  18. }); //close $.ajax(
  19. }); //close click(
  20. }); //close $(
  21. </script>
Try not to bump 10 year old threads as it can be really annoying.
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 37
Reputation: shefeekj has a little shameless behaviour in the past 
Solved Threads: 2
shefeekj shefeekj is offline Offline
Light Poster

Re: Help Required to reduce website load time

 
0
  #5
Apr 28th, 2009
thanks a lot for the reply .. i am searching for a better option to do this ..trying to rewrite the code too....i will post the tutorials if i get a better option
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 257
Reputation: BzzBee is an unknown quantity at this point 
Solved Threads: 37
BzzBee BzzBee is offline Offline
Posting Whiz in Training

Re: Help Required to reduce website load time

 
0
  #6
Apr 28th, 2009
simplify your code. use functions and try to use the the common code in separate file and include that at required place. Apply OOPs and try to apply efficient quires.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC