Increase load time of webpage by shortening code.
Posted: Thu Nov 03, 2011 12:33 am
Hi there I have a website
http://wallpapers.everything.org.in
And due to loading of 60 images the webpage loading time has increased tremendously,
But I wanna load those images.
take a look at the webpage!
my php code is as below
http://wallpapers.everything.org.in
And due to loading of 60 images the webpage loading time has increased tremendously,
But I wanna load those images.
take a look at the webpage!
my php code is as below
Code: Select all
<html>
<head>
<title>Wallpapers.everything.org.in-download from thousands of wallpapers
</title>
<script type="text/javascript" src="crawler.js">
</script>
<link rel="stylesheet" type="text/css" href="all.css">
</head>
<body onLoad="init()">
<div id="loading" class="loading">
<div class="backloading"> <img src="images/ajax-loader.gif" border=0></div></div>
<script>
var ld=(document.all);
var ns4=document.layers;
var ns6=document.getElementById&&!document.all;
var ie4=document.all;
if (ns4)
ld=document.loading;
else if (ns6)
ld=document.getElementById("loading").style;
else if (ie4)
ld=document.all.loading.style;
function init()
{
if(ns4){ld.visibility="hidden";}
else if (ns6||ie4) ld.display="none";
}
</script>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=196287183727314";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fbbut">
<div class="fb-like" data-href="http://wallpapers.everything.org.in" data-send="false" data-layout="button_count" data-width="50" data-show-faces="true"></div>
</div>
<div class="title">
<img src="images/title.jpg">
</div>
<div class="lftadd">
<a href="http://www.gainmoneyfast.com/-53951/3876.htm" target="_top"><img src="http://www.gainmoneyfast.com/banners/banner_120x60_970610.gif" border="0" alt="Affiliate Program"></a></div>
<iframe width="850" height="540" class="iframe" border="0" name="view" src="http://wallpapers.everything.org.in/main.html">
</iframe>
<?php
ob_start();
$a = 1;
$b = 60;
//ConnectstoyourDatabase
mysql_connect("abc", "abcr", "abc") or die(mysql_error());
mysql_select_db("abc") or die(mysql_error());
?>
<div class="c">
<div class="marquee" id="mycrawler2">
<?php
for ($a=1; $a<=$b; $a++)
{
$data = mysql_query("SELECT * FROM abc WHERE srno= $a" )
or die(mysql_error());
while($info = mysql_fetch_array( $data ))
{
Print"<a target='view' height='10' width='10' href='http://wallpapers.everything.org.in/images/".$info['Name']."'> <img src='images/".$info['Name'] . "' height='90' width='90'></a>";
}
}
ob_end_flush();
?>
</div>
<script type="text/javascript">
marqueeInit({
uniqueid: 'mycrawler2',
style: {
},
inc: 5, //speed - pixel increment for each iteration of this marquee's movement
mouse: 'cursor driven', //mouseover behavior ('pause' 'cursor driven' or false)
moveatleast: 2,
neutral: 150,
savedirection: true,
random: true
});
</script>
</div>
<dim class="sidebar" >
<b class="welcomemess">Welcome Guest,</b>
</dim>
<dim class="rgtmenu">
<a href="http://wallpapers.everything.org.in/nature.html" style="text-decoration:none;color:#cc0000;">Nature</a><br>
<a href="http://wallpapers.everything.org.in/cars.html" style="text-decoration:none;color:#cc0000;">Cars</a><br>
<a href="http://wallpapers.everything.org.in/wild.html" style="text-decoration:none;color:#cc0000;">Wildlife</a><br>
<a href="http://wallpapers.everything.org.in/forest.html" style="text-decoration:none;color:#cc0000;">Forest</a><br>
<a href="http://wallpapers.everything.org.in/anime.html" style="text-decoration:none;color:#cc0000;">Anime</a><br>
<a href="http://wallpapers.everything.org.in/music.html" style="text-decoration:none;color:#cc0000;">Music</a><br>
<a href="http://wallpapers.everything.org.in/celebs.html" style="text-decoration:none;color:#cc0000;">Celebrities</a><br>
<a href="http://wallpapers.everything.org.in/game.html" style="text-decoration:none;color:#cc0000;">Game</a><br>
<a href="http://wallpapers.everything.org.in/bikes.html" style="text-decoration:none;color:#cc0000;">Bikes</a><br>
<a href="http://wallpapers.everything.org.in/divine.html" style="text-decoration:none;color:#cc0000;">Divine</a><br>
<a href="http://wallpapers.everything.org.in/scene.html" style="text-decoration:none;color:#cc0000;">Scenery</a><br>
<a href="http://wallpapers.everything.org.in/gadget.html" style="text-decoration:none;color:#cc0000;">gadgets/electronics</a><br>
<a href="http://wallpapers.everything.org.in/other.html" style="text-decoration:none;color:#cc0000;">Other</option><br><br><br>
<a href="http://wallpapers.everything.org.in/upload.php" style="text-decoration:none;color:#cc0000;"><input type="button" value="Upload"></a><br>
<a href="http://wallpapers.everything.org.in/report.html" style="text-decoration:none;color:#cc0000;"><input type="button" value="report a copyrighted image."></a>
</dim>
<dim class="rgtadd" >
<script type="text/javascript" src="http://www.gainmoneyfast.com/services/banner_rotator.php?a_aid=53951&a_bid=3787"></script>
</div>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-26066258-2']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>