I come from Web 1.0, so anything newer than that annoys me, especially when trying to preserve things. Wget works great on older stuff, but not so much when it comes to slightly more modern things.
For the most part I’ve resorted to just using saving each webpage I want as a single file mhtml, and that works for my needs after a bit of editing to the html files and their links to call each other locally.
I tried doing that with something today, and I am not having much luck.
When trying to point a href to a local file, it is not opening. It opens when I right click the link and open in new tab, but just a normal left click does nothing.
The website in question is http://www.playonline.com/ff11/xiyears/vt3/index.html#preview-1 and under the “Top Story” area, there is that orange oval button that will bring you to the content of that next page. When I offline this page along with the content of the “more” page, I cannot get that link to work.
On the initial save, the block of code in question is
<!-- more -->
<ul>
<li class=3D"f-left copy-text"></li>
<li class=3D"f-right"><a class=3D"more-btn hover"></a></li>
</ul><!-- more -->
and the button fails to work as is, so I modified that to
<!-- more -->
<ul>
<li class=3D"f-left copy-text"></li>
<li class=3D"f-right"><a href="/"<a class=3D"more-btn hover"></a></li>
</ul><!-- more -->
And it now works as a clickable link which goes to SE within the same tab.
However, when I try to point it to the relevant offline file using any of the following examples and many others, nothing happens.
href="file:///H:/TempVT3/01Top.mhtml"
href="./01Top.mhtml"
href=".01Top.mhtml"
href="01Top.mhtml"
In actuality, If I use relative pathing it makes it worse. There is a block of code near the top that states Content-Location: http://www.playonline.com/ff11/xiyears/vt3/index.html#preview-1
that is forcing relative paths to use http://www.playonline.com/etc/etc/etc to where it ends up being http://www.playonline.com/ff11/xiyears/vt3/01Top.mhtml and of course that does not work.
I commented out that “Content-Location” block, and relative paths are pointing correctly, but they still do not open.
I also tried using href targets to at least force a result, but that did not help. Example being
<a "href="/" target="_blank" style="target-new: tab;">More1</a>
and
<a target="_self" href="/">More2</a>
works fine, where
<a href="file:///H:/TempVT3/01Top.mhtml" target="_blank" style="target-new: tab;">More3</a>
etc does nothing, unless I again right-click open new tab.
What gives? I know this page isnt doing a full load of the ‘More’ page when clicked on normally, it’s just bringing in content in an iframe type of way (not exactly, just it’s the only way I can explain it), but why does hrefs pointing to SE work fine, but not local files?
What in this html is blocking that, what can I change or override that makes opening another offline file possible without going overboard on editing?
SephYuyX is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.