我用HTTrack下载了sonst.cc,但离线查看时没有内容。每个标签都是空的。那是为什么?
还有其他可以下载整个内容的应用程序吗?
我在这里失去了理智。
感谢。
修改
当我打开索引文件,使用HTTrack下载时,在Safari中,首页加载背景图片,菜单......一切都很完美!除非我点击任何一个菜单,否则标签会打开!完全没有内容!那说它下载了整个网站... html,css,js,images,...当我看到代码时,一切似乎都很好。它就在那里!
的index.html
<html>
<head>
<title>SONST</title>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<meta name="title" content="SONST" />
<meta name="doc-type" content="Web Page" />
<meta name="Content-Language" content="en" />
<meta name="author" content="Brill Webdesign, Eindhoven" />
<meta name="web_author" content="Brill Webdesign, Eindhoven" />
<meta name="production" content="Brill Webdesign - http://www.brill-webdesign.nl" />
<meta name="copyright" content="2015, Brill Webdesign" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="classification" content="Business and Economy" />
<meta name="Rating" content="General" />
<meta name="revisit-after" content="5 Days" />
<meta name="doc-class" content="Living Document" />
<meta name="robots" content="all" />
<meta http-equiv="imagetoolbar" content="no" />
<link rel="Shortcut Icon" href="favicon.html" type="image/x-icon" />
<link rel="icon" href="favicon.html" type="image/x-icon" />
<link rel="stylesheet" href="css/styles.css" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="css/slideshow.css" type="text/css" media="screen" />
<script type="text/javascript" src="scripts/mootools-core-1.3.1-full-compat-yc.js"></script>
<script type="text/javascript" src="scripts/mootools-more-1.3.1.1.js"></script>
<script type="text/javascript" src="scripts/interface.js"></script>
<script type="text/javascript" src="scripts/slideshow.js"></script>
<script type="text/javascript" src="scripts/fitimage.js"></script>
<script type="text/javascript">
window.addEvent('domready', function()
{
new FitImage('files/impressionen/SONST-Wald.jpg');
});
</script>
</head>
<body>
<div id="show"></div>
<div id="menu">
<a href="page5cf1.html?page=aktuelles&l=">Aktuelles</a> /
<a href="pagee4c7.html?page=angebot&l=">Angebot</a> /
<a href="page6e95.html?page=projekte&l=">Realisierte Projekte</a> /
<a href="page0c6a.html?page=referenzen&l=">Referenzen</a> /
<a href="pagee1df.html?page=kontakt&l=">Kontakt</a> /
<a href="paged192.html?page=impressum&l=">Impressum</a>
</div>
<div id="wrapper">
<div id="block_01" class="block">
<div class="remove">
<a href="#" onclick="slidepic();slide04();slide03();slide02();slide01();resetDelay();">×</a>
</div>
<div id="block_01_inner"></div>
</div>
<div id="block_02" class="block">
<div class="remove">
<a href="#" onclick="slidepic();slide04();slide03();slide02();resetDelay();">×</a>
</div>
<div id="block_02_inner"></div>
</div>
<div id="block_03" class="block">
<div class="remove">
<a href="#" onclick="slidepic();slide04();slide03();resetDelay();">×</a>
</div>
<div id="block_03_inner"></div>
</div>
<div id="block_04" class="block">
<div class="remove">
<a href="#" onclick="slidepic();slide04();resetDelay();">×</a>
</div>
<div id="block_04_inner"></div>
</div>
<div id="block_pic" class="block" rel="off">
<div class="remove" style="height: 0;">
<a href="#" onclick="slidepic();resetDelay();" id="close_pic">×</a>
</div>
<div id="block_pic_slideshow" rel="0" onclick="javascript:next_pic(); return false;"></div>
</div>
</div>
<div class="introLogo">
<img src="images/logo.png" alt="sonst" width="920" height="291" border="0" />
</div>
<div class="lang">
<a href="index124c.html?l=e">E</a> / <a href="index1d70.html?l=d">D</a>
</div>
</body>
答案 0 :(得分:1)
我做了wget -p -k http://sonst.cc
并获得了index.html及其所有相关的css和js文件。
背景图片没有被拉出,但除此之外,页面看起来还不错。
我检查了标签,确实他们没有工作。仔细检查发现他们在点击:
后从外部php文件加载内容
由于PHP文件是在服务器端处理的,自然wget
或httrack
无法获取代码,因此无法加载相关内容。当它尝试从服务器提取时,我会得到Access Control
cross-origin error
如果你真的想要一个工作版本的页面,假设选项卡数量相对较少,你可以手动复制php脚本中的响应并编辑index.html
中的js以从本地副本加载选项卡反而回应了。
答案 1 :(得分:1)
某些服务器从浏览器请求标头。要模仿这种确切的行为,请按照以下步骤操作: