| Hi,
I have got the following problem:
I am trying to download my own, simple, mainly static page, for which I don't
have the access to any source files. The page is generated by a paid service
called inPage.
I have got a problem with styles.
The page has got style tags in the form
<link href="/styl/1/" rel="stylesheet" type="text/css"
media="screen,projection" />
And if i inspect the target, it returns the header
"Content-Type: text/css; charset=utf-8"
But after downloading with HTTRACK, the file is renamed to a default filename
"index.html" and also the link changes to
<link href="styl/1/index.html" rel="stylesheet" type="text/css"
media="screen,projection" />
And Opera 11, my favorite browser, doesn't accept css files with html
extension, because the associated mime type is wrong and displays the document
without the stylesheet.
I guess this can be considered an inconvenience or even bug of HTTrack.
What about this:
if the linked file doesn't contain a filename, check the mimetype of the
target and if "text/css", change the filename for example to index.css, which
would return the right mime type in Opera 11. I don't know if this is an
intended security thing of Opera, or Opera's bug, but they won't repair that
anyway. And stylesheet would look better with the css file exstension anyway.
I was thinking about the situation, when this modification, which I suggest,
causes anything unexpected at other websites.
And I believe everything will be ok.
If the index.php (or index.asp or whatever) returns css content and text/css
mime type, you can just replace any "dir/index.php" and "dir/" with
"dir/index.css" without problems.
Thank you very much.
Iconer
| |