4

I downloaded sonst.cc with HTTrack, but when viewing it offline there’s no content. Every single tab is empty. Why is that?

Is there any other app with which I could download the whole thing?

I’m losing my mind over here.

Thanks.

Edit:

When I open the index file, downloaded with HTTrack, in Safari the front page loads just fine with the background image, the menus... everything is perfect! Except when I click on any of the menus the tabs open up empty! No content at all!!! That said it downloaded the whole site... html, css, js, images, ...and when I look at the code everything seems fine. It's all there!

Screenshot

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&amp;l=">Aktuelles</a> /
        <a href="pagee4c7.html?page=angebot&amp;l=">Angebot</a> /
        <a href="page6e95.html?page=projekte&amp;l=">Realisierte Projekte</a> /
        <a href="page0c6a.html?page=referenzen&amp;l=">Referenzen</a> /
        <a href="pagee1df.html?page=kontakt&amp;l=">Kontakt</a> /
        <a href="paged192.html?page=impressum&amp;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();">&times;</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();">&times;</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();">&times;</a>
            </div>
            <div id="block_03_inner"></div>
        </div>

        <div id="block_04" class="block">
            <div class="remove">
                <a href="#" onclick="slidepic();slide04();resetDelay();">&times;</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">&times;</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>

Huey
  • 4,654
  • 6
  • 30
  • 43
jay
  • 41
  • 1
  • 3
  • Open the files you downloaded and take a look at what's in there? Post the index page here so we can get an idea of what could be the issue. – Huey Jan 10 '15 at 11:14
  • I have, and everything appears to be okay. – jay Jan 10 '15 at 11:16
  • We're really going to need more details, not just you saying there's not content, yet everything is "okay". Post a sample html file with its associated css/js here. View source in your browser to verify you're looking at a proper file. Check for JS console errors. Check to make sure the stylesheet or js scripts arent' missing. – Huey Jan 10 '15 at 11:24
  • I opened the index file downloaded with HTTrack in Safari and the front page loads just fine with the background image, the menus... everything is perfect! Except when I click on any of the menus the tabs open up empty! No content at all!!! That said it downloaded the whole site... html, css, js, images, ...and when I look at the code everything seems fine. It's all there! It's kinda hard to put the whole thing in here... don't you think? – jay Jan 10 '15 at 11:29
  • I didn't ask for the whole thing, just the index page. But that's better, thanks. The tabs are done in JS, so I'd suggest checking the JS console for errors. Also, consider editing your question to make it clearer what you tried, especially since you initially said there was `no content`, which suggests a blank page. – Huey Jan 10 '15 at 11:34
  • @Huey I edited the 1st post and added a screenshot and the index file. please have a look. thanks. – jay Jan 10 '15 at 12:01

2 Answers2

2

Some servers requests headers from the browser. To mimic this exact behaviour follow these steps:

  1. Press F12 on the browser and look for "Network" or "Net" tab
  2. Open the webpage you want to download
  3. Expand the first item on the list, that should be a GET request
  4. Check where it says "Headers". If you're using Firebug in Firefox, you may also click "view source"
  5. Copy all of the headers atarting on the line that reads "Host:" by painting them with the mouse and pressing CONTROL+C
  6. Go to HTTrack and click the "Set options" button of your current download (under the urls).
  7. Go to the "Browser ID" tab leave "Browser identity" empty, HTML footer "(none)" and on the "Additional HTTP headers" paste what you've copied on step #5
  8. You're all set.
Diego Sagrera
  • 243
  • 4
  • 11
0

I did a wget -p -k http://sonst.cc and got index.html with all its associated css and js files.

The background image didn't get pulled, but apart from that, the page looks okay. sonst.cc

I checked out the tabs, and indeed they weren't working. Closer inspection reveals they're loading content from an external php file upon clicking:

dev tools

Since the PHP file is processed server side, naturally wget or httrack can't get its hands on the code, so can't load the relevant content. When it tries to pull it from the server, I get an Access Control cross-origin error

error

If you really want a working version of the page, given the relatively few number of tabs, you could manually copy the responses from the php script and edit the js in index.html to load the tabs from your local copy of the responses instead.

Community
  • 1
  • 1
Huey
  • 4,654
  • 6
  • 30
  • 43
  • Got it! Yeah, yhat would be great, but unfortunately I don't think I can do that by myself. Would you be able to that for 1 of the tabs lead to a slideshow, so I can see how it's done? Or just let me know how to do it (load the tabs from my local copy) step-by-step... I know nothing about PHP. Thanks a lot. – jay Jan 10 '15 at 16:46
  • This isn't PHP knowledge. Just copy and paste the html responses you get on the live web page (using dev console) into the index.html file, then change the JS to load those instead of trying to call home. – Huey Jan 11 '15 at 07:03
  • It's the same stuff you got with wget. I played around with it, but honestly I didn't know what I was doing! I don't understand the js (the one that matters) nor what i have to do... – jay Jan 11 '15 at 12:18
  • Shouldn't [this](http://blog.jphoude.qc.ca/2007/10/16/creating-static-copy-of-a-dynamic-website/) fix it automatically? I tried it but didn't work. :( – jay Jan 12 '15 at 13:22