| > js folder:
> <script src='js/myjs.js'></script>
> In this file are references to images such as:
> image1.src = 'gfx/image1.jpg';
> The browser correctly fetches the image from
> www.mysite.com/gfx/image1.jpg, but HTTrack tries to get it
> from www.mysite.com/js/gfx/image1.jpg as can be seen in
the
> error log and the fact that these images are never copied.
Well this is not really a bug. It is a problem with the way
Javascript works, and I have seen this many many times in my
mirrors. The problem makes sense because HTTrack does not
"understand" JS, only attempts to "parse" it:
The file "myjs.js" is in the "js" folder. In a browser,
that file is loaded from the level above, so any image URLs
will be relative to THAT level.
Now when HTTrack goes into the "js" folder to access "myjs.
js", it finds a reference to "gfx/image1.jpg" and decides to
download it... but because it is RELATIVE, the program tries
to go to "js/gfx/image1.jpg".
Same issue on sites with navigation generated by Javascript.
Often it will fail -- in HTTrack and search engines.
| |