Why call iframe from javascript
- by sammville
I want to know why some ad codes or embed codes don't directly give you iframe code to embed on your site instead they give a javascript code which links to another javascript file on their server. The file on their server calls the iframe which serves the content. Why is this done and what are the benefits of this method.
Example: this is the code issued by amazon:
<script type="text/javascript" src="http://www.assoc-amazon.co.uk/s/ads.js"></script>
Which opens another javascript file that calls the iframe.