Web Site Speed

K

KELLY********

OK i redone my site seem to run faster. but know I have
buttons that act funny and are not consistant. When you
mouse over it changes when you click it follows a link.
but sometimes it doesnt show the picture you click it
again then the picture comes back. click it a few more
times and the picture isnt there reclick it or click
another button and the picture comes back. radomly happens
to any button

function init() {
if (!document.getElementById) return
var imgOriginSrc;
var imgTemp = new Array();
var imgarr = document.getElementsByTagName('img');
for (var i = 0; i < imgarr.length; i++) {
if (imgarr.getAttribute('hsrc')) {
imgTemp = new Image();
imgTemp.src = imgarr.getAttribute('hsrc');
imgarr.onmouseover = function() {
imgOriginSrc = this.getAttribute('src');
this.setAttribute('src',this.getAttribute
('hsrc'))
}
imgarr.onmouseout = function() {
this.setAttribute('src',imgOriginSrc)
}
}
}
}
onload=init;

</script>


<a href="index.htm">
<img border="0" src="webimage/button1.jpg"
hsrc="webimage/button1a.jpg"
align="left" width="120"
height="28"></a><p>&nbsp;</p>
<p>

<a href="news.htm">

<img border="0" src="webimage/button2.jpg"
hsrc="webimage/button2a.jpg"
align="left" width="120" height="28"></a></p>
<p>&nbsp;</p>
<p>

<a href="raceschedule.htm">

<img border="0" src="webimage/button3.jpg"
hsrc="webimage/button3a.jpg"
align="left" width="120" height="28"></a></p>
<p>&nbsp;</p>
<p>

<a href="directions.htm">

<img border="0" src="webimage/button4.jpg"
hsrc="webimage/button4a.jpg"
align="left" width="120" height="28"></a></p>
<p>&nbsp;</p>
<p>

<a href="joinwrcrw.htm">

<img border="0" src="webimage/button5.jpg"
hsrc="webimage/button5a.jpg"
align="left" width="120" height="28"></a></p>
<p>&nbsp;</p>
 
P

PinkBishop

Tricks?

There is nothing magical about it. It's all about clean code.

If you can trim all the fat off ot a FP file then you are doing pretty
well.

Some basic concepts though....

More text... Less graphics

Optimize your images- small file size

Use .css files


Well that is my two cents.
 
P

PinkBishop

Have an URL for us to view?




OK i redone my site seem to run faster. but know I have
buttons that act funny and are not consistant. When you
mouse over it changes when you click it follows a link.
but sometimes it doesnt show the picture you click it
again then the picture comes back. click it a few more
times and the picture isnt there reclick it or click
another button and the picture comes back. radomly happens
to any button

function init() {
if (!document.getElementById) return
var imgOriginSrc;
var imgTemp = new Array();
var imgarr = document.getElementsByTagName('img');
for (var i = 0; i < imgarr.length; i++) {
if (imgarr.getAttribute('hsrc')) {
imgTemp = new Image();
imgTemp.src = imgarr.getAttribute('hsrc');
imgarr.onmouseover = function() {
imgOriginSrc = this.getAttribute('src');
this.setAttribute('src',this.getAttribute
('hsrc'))
}
imgarr.onmouseout = function() {
this.setAttribute('src',imgOriginSrc)
}
}
}
}
onload=init;

</script>


<a href="index.htm">
<img border="0" src="webimage/button1.jpg"
hsrc="webimage/button1a.jpg"
align="left" width="120"
height="28"></a><p>&nbsp;</p>
<p>

<a href="news.htm">

<img border="0" src="webimage/button2.jpg"
hsrc="webimage/button2a.jpg"
align="left" width="120" height="28"></a></p>
<p>&nbsp;</p>
<p>

<a href="raceschedule.htm">

<img border="0" src="webimage/button3.jpg"
hsrc="webimage/button3a.jpg"
align="left" width="120" height="28"></a></p>
<p>&nbsp;</p>
<p>

<a href="directions.htm">

<img border="0" src="webimage/button4.jpg"
hsrc="webimage/button4a.jpg"
align="left" width="120" height="28"></a></p>
<p>&nbsp;</p>
<p>

<a href="joinwrcrw.htm">

<img border="0" src="webimage/button5.jpg"
hsrc="webimage/button5a.jpg"
align="left" width="120" height="28"></a></p>
<p>&nbsp;</p>
-----Original Message-----
What are some tricks for making your web site faster
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top