title: Setting base URL path of iframe
body: <p>Is there any possible way (html, js, jquery) to change the base URL path of an <code>iframe</code>?</p>
  
  <p>Here's what I'm trying to do: I have a webpage that has a URL-entry field and a display area. The web app takes whatever URL the user enters, and then uses a special proxy service to retrieve the webpage that the user has specified. I then render this webpage in the display area using an iframe, where I insert the html source code into the <code>DOM</code> of the <code>iframe</code>. I do not use the <code>src</code> attribute because I am trying to demonstrate the functionality of my proxy service, and I don't want the browser to directly render the page itself.</p>
  
  <p>The html source that I insert will load in the iframe, with one caveat. None of the images or other resources that use a relative pathname work because they reference the URL of my outer webpage as the base URL. For example, if my webpage is located at <code>www.me.com</code> and the user tries to load <code>www.google.com</code>, I can render the <code>html</code> source for <code>www.google.com</code>, but the main Google image does not load because the image tries to load from <code>www.me.com/image</code> rather than <code>www.google.com/image</code>. </p>