asp图片代码优化问题
小弟我是个asp初学者,碰到个问题请教下?asp网站上图片打开很慢,图片的格式是gif,读取的是数据库,请问怎么让图片在网页上打开快点?或者是优化下图片代码?
小弟不胜感激。
下面是代码:
<%
Set rs4 = Server.CreateObject ("ADODB.Recordset")
sql4 = "Select top 5 * from spot where url<>'' order by [id] DESC "
rs4.Open sql4,conn,1,1
if rs4.eof or rs4.bof then
else
i=0
a=rs4.RecordCount
dim newpic(5)
dim newlink(5)
dim newtxt(5)
do while (not rs4.eof) and i<cint(a)
newpic(i)="Upload/tour/"&rs4("url")
newlink(i)="spotinfo1.asp?id="&rs4("id")
newtxt(i)=""
i=i+1
rs4.movenext
loop
j=0
jxspic=""
do while j<rs4.RecordCount
jxspic=jxspic&newpic(j)&"|"
jxslink=jxslink&newlink(j)&"|"
jxstxt=jxstxt&newtxt(j)&"|"
j=j+1
loop
newjxspic=mid(jxspic,1,cint(Len(jxspic))-1)
newjxslink=mid(jxslink,1,cint(Len(jxslink))-1)
newjxstxt=mid(jxstxt,1,cint(Len(jxstxt))-1)
end if
rs4.close
set rs4 = Nothing
%>
<script type="text/javascript">
var swf_width=287;
var swf_height=343;
var text_height=12;
var config='5|0xffffff|0xed1510|50|0xffffff|0xed1510|0x000000'
//-- config 参数设置 -- 自动播放时间(秒)|文字颜色|文字背景色|文字背景透明度|按键数字颜色|当前按键颜色|普通按键色彩 --
var files='<%=newjxspic%>'
var links='<%=newjxslink%>'
var texts='<%=newjxstxt%>'
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.,0,0,0" width="'+ swf_width +'" height="'+ swf_height +'">');
document.write('<param name="movie" value="Scripts/product2007sp6-1.swf" />');
document.write('<param name="quality" value="high" />');
document.write('<param name="menu" value="false" />');
document.write('<param name=wmode value="opaque" />');
document.write('<param name="FlashVars" value="config='+config+'&bcastr_flie='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'" />');
document.write('<embed src="Scripts/product2007sp6-1.swf" wmode="opaque" FlashVars="config='+config+'&bcastr_flie='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'& menu="false" quality="high" width="'+ swf_width +'" height="'+ swf_height +'" type="application/x-shockwave-flash" pluginspage="http://www. />');
document.write('</object>');
</script>