hide iframe url in HTML source code

iframe

Solution

You can use javascript to load the source, and it will not be visible in `iframe url` in page source code. For example with `jQuery`:

<script type="text/javascript">
$(document).ready(function(e) {
  $('iframe').attr('src','http://www.flickr.com/');
});
</script>

<body>
<iframe src="" />
</body>

Example here.

You can combine it with `$.post` to get the value serverside:

$.post('get-iframe-src.php', function(data) {
  $('iframe').attr('src',data);
});

You can even load `iframe` itself to some element like:

$.post('get-iframe.php', function(data) {
  $('#element_id').html(data);
});

etc. solutions are many, this is just one of.

Problem

How to hide iframe url From HTML source code? ``` <iframe src="http://mysite.com" frameborder="0" scrolling="no" width="728" height="90"></iframe> ```

Original source

Related problems