Free Republic
Browse · Search
News/Activism
Topics · Post Article

To: neverdem
Wasn't there a way to save the webpage to a new file, and then retrieve it after one or two other commands with all the relative links converted to absolute.

You can save the page to a disk file. I tried that in one or two cases before inventing the bookmarklet, which is what I've used since.

If you save a page as "Web Page, Complete", it will save the HTML to a file and copy the images, etc., into a folder named after the HTML file. If you look inside the saved page, you will see that the links have been made absolute. However, the image URLs now all point into the page's companion disk folder, which means the image tags are no good for posting.

An alternative is to save the page as "Web Page, HTML Only". That leaves the links and image URLs unchanged. However, then you need a way to make the relative ones absolute without doing a lot of work. A possibility might be a global change in your favorite text editor. E.g., you could have your editor change every occurrence of href="/ to href="http://www.somewhere.com/. And similarly for src="/.

However, using text editors to make global changes can lead to unexpected results. I find it easier to click the bookmarklet, then View Selection Source, then copy what I want out of the source window and modify it as needed, the relative URLs having already been fixed by the script in the bookmarklet. For difficult cases, a text editor might come in handy to clean up the HTML, but usually I just paste directly into the posting window.

68 posted on 04/22/2011 2:23:41 PM PDT by cynwoody
[ Post Reply | Private Reply | To 66 | View Replies ]


To: cynwoody

Thank you again!


69 posted on 04/22/2011 3:03:50 PM PDT by neverdem (Xin loi minh oi)
[ Post Reply | Private Reply | To 68 | View Replies ]

Free Republic
Browse · Search
News/Activism
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson