Iframe: visual=true, visual=false - What do they mean?

Iframe: visual=true, visual=false - What do they mean?


I found out that one can change how the embedded SoundCloud track looks on a site. So if you don’t want the background image to cover the full length and prefer the image to be a more respectable size (see attached image),

you change




in the <iframe> code

Eg. From this:

<iframe width="100%" height="300" scrolling="no" frameborder="no" allow="autoplay" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/302128378&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=true"></iframe>

To this:

<iframe width="100%" height="300" scrolling="no" frameborder="no" allow="autoplay" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/302128378&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=false"></iframe>

I know ‘true’ and ‘false’ are Booleans. Is ‘visual’ an attribute or parameter or …? What do visual=true and visual=false actually do?

Many thanks!



It’s just a query string parameter. When you make an HTTP request (specifically a GET request), you can attach parameters to it. Say you want to go the webpage example.com, you make a GET request to http://example.com. Maybe the page has a search box. So one common way for that to work is that the user types “hello” in the search box, hits search, and that triggers a GET request with parameters. Then on the back end of the site, you say “if a request if made that includes a search parameter, show some results on the page”. So when the search is triggered, a request is made to http://example.com?search=hello, the page reloads and this time it has search results for “hello”.

Query strings look like: ? after the URL, then key=value pairs separated by &.

What they do is entirely up to the application/s you are contacting, in this case something hooked into Soundcloud’s web server — you already know what they do, how it is done could be guessed at, but realistically you are never going to know: what they mean beyond what you already know, ie the mechanics of what they do are hidden in a company’s code.

1 Like


This is really interesting. Indeed a useful article. Thanks