Note that there are some explanatory texts on larger screens.

plurals
  1. POProviding a JavaScript link to embed content
    primarykey
    data
    text
    <p>I'm writing on behalf of <a href="http://ystv.york.ac.uk/" rel="nofollow noreferrer">YSTV</a>; we're looking at providing embed options for our videos, and I've got a quick question.</p> <p>We can obviously provide embed code to users such as</p> <p><code>&lt;embed height="360" width="480" flashvars="backcolor=0xffffff&amp;amp;autostart=false&amp;amp;file=http://ystv.york.ac.uk/static/videos.php?file=1040&amp;amp;autoscroll=false&amp;amp;displayheight=360&amp;amp;width=480&amp;amp;height=360&amp;amp;type=video&amp;amp" allowfullscreen="true" quality="high" name="ystvplayer" src="http://ystv.york.ac.uk/static/flash/mediaplayer4.swf" type="application/x-shockwave-flash" /&gt;</code></p> <p>which is what every (ok, so not <em>every</em>, but the vast majority) video sharing site does (YouTube, Break, Vimeo etc).</p> <p>However, somebody's pointed out that we could also provide a JavaScript embed link as follows:</p> <pre><code>&lt;script type="text/javascript" src="http://full.path/to/embed.js"&gt;&lt;/script&gt; </code></pre> <p>Where embed.js contains</p> <pre><code>document.write('EMBED_TAG_PROVIDED_ABOVE'); </code></pre> <p>What's the disadvantage of the JS embed option? The advantage is obvious, it's a nicer URL for the user, less characters to place in their site. I'm worried about security here, as somebody who doesn't know JavaScript; is this an inherently insecure way of doing things? And if the JavaScript URL is fine, how come none of the well-known sites do it?</p> <p>Cheers,</p> <p>Alex</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload