How I can to copy source of web page with absolute URL in source instead of relative paths? Preferable — Firefox, but any others solutions would be nice too.


Page: http://www.thepetedesign.com/demos/planetarium_demo.html
Source of page: view-source:http://www.thepetedesign.com/demos/planetarium_demo.html

Actual behavior

<script type="text/javascript" src="planetarium/jquery.planetarium.js"></script>
<link href='planetarium/planetarium.css' rel='stylesheet' type='text/css'>

<link rel="stylesheet" href="../css/demo.css">
<script src="../js/demo.js"></script>

Expected behavior

<script type="text/javascript" src="http://www.thepetedesign.com/demos/planetarium/jquery.planetarium.js"></script>
<link href='http://www.thepetedesign.com/demos/planetarium/planetarium.css' rel='stylesheet' type='text/css'>

<link rel="stylesheet" href="http://www.thepetedesign.com/css/demo.css">
<script src="http://www.thepetedesign.com/js/demo.js"></script>


If I view source of pages, I usually want edit and preview code of page in my text editor or in codepen.io site, but I need every time change relative paths to full URL. It takes a lot of time.

Do not offer

I want to show result for others users, not only for me. Therefore, please, do not offer:

  1. Firefox Web Console or Firebug. I can not show my editing in Web Console/Firebug results for others users.
  2. Saving web pages. If I save web pages, js/css files was saved in my computer and relative links convert to links of my computer. I can not to show my local files for others users.

But if is it possible save web page with convert relative links to absolute URL's, it would be nice solution.

Not helped

  1. I search Firefox addons, for example, by keyword view source, I download addons, for example, View Source, but I not find addon with needed function.
  2. I find bookmarklet. This is the best solution that I could find, but not all links to convert correct and now this bookmarklet not supported.
  • What happens if you just save the page? There isn't going to magic that does it by just copying the code. Also if you just want to have a quit view of how changes might look, consider using the built-in tools in modern browsers (F12). – Seth Nov 15 '16 at 8:49
  • @Seth, I update my answer. I find «magic» bookmarklet, but not all links convert correct. Thanks. – Саша Черных Nov 15 '16 at 9:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.