Join the Mozilla’s Test Days event from 9–15 Jan to test the new Firefox address bar on Firefox Beta 135 and get a chance to win Mozilla swag vouchers! 🎁

Този сайт ще има ограничена функционалност, докато се извършва тече неговата поддръжка. Ако дадена статия не може реши проблема ви и искате да зададете въпрос, нашата общност е готова да ви помогне на @firefox в Twitter и /r/firefox в Reddit.

Търсене в помощните статии

Избягвайте измамите при поддръжката. Никога няма да ви помолим да се обадите или изпратите SMS на телефонен номер или да споделите лична информация. Моля, докладвайте подозрителна активност на "Докладване за злоупотреба".

Научете повече

Some local links on web pages have been changed to fixed references on a saved page

  • 4 отговора
  • 2 имат този проблем
  • 1 изглед
  • Последен отговор от ptoye

more options

I saved a page http://www.lilypond.org/doc/v2.18/Documentation/notation/index.html to my hard disk. The links in the table of contents on the left are all to the original website. I've looked at the file on disk and this is the case. An example is <a name="toc-Spacing-issues-1" href="http://www.lilypond.org/doc/v2.18/Documentation/notation-big-page#spacing-issues">4. Spacing issues</a>


But the original file had local links at the same place (a website expert there tells me), <a name="toc-Spacing-issues-1" href="notation-big-page#spacing-issues">4. Spacing issues</a>

Not all of the links are changed: some of them in the main text are still local links. Which I find even odder.

Why (and how) is Firefox changing the HTML text?

I saved a page http://www.lilypond.org/doc/v2.18/Documentation/notation/index.html to my hard disk. The links in the table of contents on the left are all to the original website. I've looked at the file on disk and this is the case. An example is <a name="toc-Spacing-issues-1" href="http://www.lilypond.org/doc/v2.18/Documentation/notation-big-page#spacing-issues">4. Spacing issues</a> But the original file had local links at the same place (a website expert there tells me), <a name="toc-Spacing-issues-1" href="notation-big-page#spacing-issues">4. Spacing issues</a> Not all of the links are changed: some of them in the main text are still local links. Which I find even odder. Why (and how) is Firefox changing the HTML text?

Избрано решение

Thanks Finitarry - but the links are being changed to point to the original server, not my downloaded copy. That's the problem!

Also thank cor-el. I use "web page, complete" for the download.

I think I've found the problem, now that you've pointed out where I should be looking. I've found the original HTML, and in most cases the references are strictly local. But in the problem cases, the link contains the file name, which Firefox interprets as a request to point to the original file on the server rather than the local copy. Whether this is a bug or a feature would make an interesting discussion. I'll ask the web manager is that's what they meant to happen. I'll try another browser to see what happens there.

Прочетете този отговор в контекста 👍 0

Всички отговори (4)

more options

All the links in a saved page should point to the files saved with the page. If some are not changed, that would be odd.

more options

If there are links to pages other that the one you currently view then those links will be changed to files on the server and not local files if you use "Web page, complete" to save the page.
You would have to use other means to download web pages if you do not want Firefox to modify the page content.


more options

Избрано решение

Thanks Finitarry - but the links are being changed to point to the original server, not my downloaded copy. That's the problem!

Also thank cor-el. I use "web page, complete" for the download.

I think I've found the problem, now that you've pointed out where I should be looking. I've found the original HTML, and in most cases the references are strictly local. But in the problem cases, the link contains the file name, which Firefox interprets as a request to point to the original file on the server rather than the local copy. Whether this is a bug or a feature would make an interesting discussion. I'll ask the web manager is that's what they meant to happen. I'll try another browser to see what happens there.

more options

To continue....

I realised that the links which are translated to server link are those which have the filename included, even when it's the same file name as the one being browsed. So file#anchor is saved as www.site.file#anchor, while #anchor is saved as #anchor.

I've found that neither IE nor Opera save the files at all, and all links are saved as www.site.file#anchor, even if they start out as #anchor, so Firefox is actually doing the right thing here.

Would it be a good idea if when saving FF were to look at the file name on links and if it's the same as the current page, save it as a local reference? I can think of arguments either way.