首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

打开网页很慢,显示不全,提示正在上载图片。

2012-08-09 
打开网页很慢,显示不全,提示正在下载图片。。。。遇到个问题,有个客户打开我公司的网页很慢很慢,网页显示不全,

打开网页很慢,显示不全,提示正在下载图片。。。。
遇到个问题,有个客户打开我公司的网页很慢很慢,网页显示不全,图片总下不下来,左下角一直都是正在下载******.jpg。打开其它网站没有任何问题而且很快。就这一个客户是这样,其它客户能正常访问,网页上的图片不超过20张,都是些几K的背景图,请问这是怎么回事?

贴个登陆页面的代码如下:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">

<title>太平洋财险-货运险登陆</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!--Fireworks CS3 Dreamweaver CS3 target. Created Wed Sep 15 17:43:33 GMT+0800 2010-->

<script language="javascript" type="text/javascript">
var xmlHttp;
var ajaxXMl=new AjaxXmlHttp();

function AjaxXmlHttp()
{

}

AjaxXmlHttp.prototype.CreateXmlHttp=function()
{
var activeKey=new Array("MSXML2.XMLHTTP.5.0",
"MSXML2.XMLHTTP.4.0",
"MSXML2.XMLHTTP.3.0",
"MSXML2.XMLHTTP",
"Microsoft.XMLHTTP");
if(window.ActiveXObject)
{
for(var i=0;i<activeKey.length;i++)
{
try
{
this.xmlHttp=new ActiveXObject(activeKey[i]);
if(this.xmlHttp!=null)
return this.xmlHttp;
}
catch(error)
{
continue;

}
throw new Error("客户端浏览器版本过低,不支持XMLHttpRequest对象,请更新浏览器");
}
else if(window.XMLHttpRequest)
{
this.xmlHttp=new window.XMLHttpRequest();
}
}

AjaxXmlHttp.prototype.$=function(elemenID)
{
return document.getElementById(elemenID) ;
}

AjaxXmlHttp.prototype.makeUrl=function(url,parameterName,parameterValue)
{
url+=(url.indexOf("?"))==-1 ? "?" : "&";//判断当前URL中是否存在? 即参数分隔符
url+=encodeURIComponent(parameterName)+"="+encodeURIComponent(parameterValue);
return url;
}
function ch()
{
  xmlHttp=ajaxXMl.CreateXmlHttp();
var url=ajaxXMl.makeUrl("Handler.ashx","l_n",ajaxXMl.$("log_name").value);
url=ajaxXMl.makeUrl(url,"l_p",ajaxXMl.$("log_pwd").value);
xmlHttp.open("Post",url,null);
xmlHttp.onreadystatechange=PoChHandler;
xmlHttp.send(null);
}

function PoChHandler()
{
  if(xmlHttp.readyState==4)
{
if(xmlHttp.status==200)
{
var str=xmlHttp.responseText;
if(str=="no")
{
alert('用户名或密码错误');
ajaxXMl.$("log_pwd").value="";
}
else
{
ajaxXMl.$('mem_id').value=str.split('/')[0];
location.href="ToolsWide/goto.aspx?mem_id="+str.split('/')[0]+"&rymc="+encodeURIComponent(str.split('/')[1]);
}
}
}
}

</script>
</head>
<body topmargin="100" style="font-size: 12pt">
<form runat="server" >
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="960">
<!-- fwtable fwsrc="太保系统登录通用模板.png" fwpage="页面 1" fwbase="login.jpg" fwstyle="Dreamweaver" fwdocid = "1821996727" fwnested="0" -->
  <tr>
  <td><img src="images/spacer.gif" width="147" height="1" border="0" alt=""></td>


  <td><img src="images/spacer.gif" width="134" height="1" border="0" alt=""></td>
  <td><img src="images/spacer.gif" width="114" height="1" border="0" alt=""></td>
  <td><img src="images/spacer.gif" width="67" height="1" border="0" alt=""></td>
  <td><img src="images/spacer.gif" width="115" height="1" border="0" alt=""></td>
  <td><img src="images/spacer.gif" width="45" height="1" border="0" alt=""></td>
  <td><img src="images/spacer.gif" width="92" height="1" border="0" alt=""></td>
  <td><img src="images/spacer.gif" width="91" height="1" border="0" alt=""></td>
  <td><img src="images/spacer.gif" width="155" height="1" border="0" alt=""></td>
  <td><img src="images/spacer.gif" width="1" height="1" border="0" alt=""></td>
  </tr>

  <tr>
  <td colspan="9"><img name="login_r1_c1" src="images/login_r1_c1.jpg" width="960" height="406" border="0" alt=""></td>
  <td><img src="images/spacer.gif" width="1" height="406" border="0" alt=""></td>
  </tr>
  <tr>
  <td rowspan="2" colspan="2"><img name="login_r2_c1" src="images/login_r2_c1.jpg" width="281" height="61" border="0" alt=""></td>
  <td>
  <asp:TextBox ID="log_name" runat="server" Height="14px" Width="100px" BorderStyle="None" BorderWidth="0px" MaxLength="16"></asp:TextBox></td>
  <td rowspan="2"><img name="login_r2_c4" src="images/login_r2_c4.jpg" width="67" height="61" border="0" alt=""></td>
  <td>
  <asp:TextBox ID="log_pwd" runat="server" BorderStyle="None" BorderWidth="0px" Height="14px"
  MaxLength="16" TextMode="Password" Width="100px"></asp:TextBox></td>
  <td rowspan="2"><img name="login_r2_c6" src="images/login_r2_c6.jpg" width="45" height="61" border="0" alt=""></td>
  <td><img name="login_r2_c7" src="images/login_r2_c7.jpg" width="92" height="22" border="0" alt="" style="cursor:hand" onclick="ch();"></td>
  <td rowspan="2" colspan="2"><img name="login_r2_c8" src="images/login_r2_c8.jpg" width="246" height="61" border="0" alt=""></td>
  <td><img src="images/spacer.gif" width="1" height="22" border="0" alt=""></td>
  </tr>
  <tr>
  <td><img name="login_r3_c3" src="images/login_r3_c3.jpg" width="114" height="39" border="0" alt=""></td>


  <td><img name="login_r3_c5" src="images/login_r3_c5.jpg" width="115" height="39" border="0" alt=""></td>
  <td><img name="login_r3_c7" src="images/login_r3_c7.jpg" width="92" height="39" border="0" alt=""></td>
  <td><img src="images/spacer.gif" width="1" height="39" border="0" alt=""></td>
  </tr>
  <tr>
  <td rowspan="2"><img name="login_r4_c1" src="images/login_r4_c1.jpg" width="147" height="143" border="0" alt=""></td>
  <td colspan="7" style="background-image:url('images/login_r4_c2.jpg'); text-align:left">
  &nbsp; &nbsp; &nbsp; 
  <a href="ToolsWide/conn.aspx" target="_blank"><span style="font-size: 14pt; color: #ffffff; font-family: 华文彩云; text-decoration: underline"><strong>货物运输保险投保咨询</strong></span></a></td>
  <td rowspan="2"><img name="login_r4_c9" src="images/login_r4_c9.jpg" width="155" height="143" border="0" alt=""></td>
  <td><img src="images/spacer.gif" width="1" height="112" border="0" alt=""></td>
  </tr>
  <tr>
  <td colspan="7"><img name="login_r5_c2" src="images/login_r5_c2.jpg" width="658" height="31" border="0" alt=""></td>
  <td><img src="images/spacer.gif" width="1" height="31" border="0" alt=""></td>
  </tr>
</table>
</div>
  <asp:HiddenField ID="mem_id" runat="server" />
</form>
</body>
</html>

[解决办法]
这个跟网络有关系啊,也许他所在的地方打开你这边的网络有问题,而开其他的没有问题,这也是很正常的啊
[解决办法]
页面图片好多啊

spacer.gif

这图片多大

压缩一下 或者切割小图 在加载看看
[解决办法]
网页图片太多太大;
网速问题;
浏览器;

总之就这几方面了

热点排行