HTTrack Website Copier
Free software offline browser - FORUM
Subject: Re: HTTrack bug - external js in different folder
Author: Leto
Date: 03/05/2003 01:22
 
> 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.


 
Reply Create subthread


All articles

Subject Author Date
HTTrack bug - external js in different folder

03/05/2003 00:12
Re: HTTrack bug - external js in different folder

03/05/2003 01:22
Re: HTTrack bug - external js in different folder

03/05/2003 06:55
Re: HTTrack bug - external js in different folder

03/05/2003 22:22
Re: HTTrack bug - external js in different folder

03/09/2003 08:36
Re: HTTrack bug - external js in different folder

03/17/2003 20:49




0

Created with FORUM 2.0.11