Follow

Does anyone know how SoundCloud keeps the audio playback alive when you navigate on their website? Feels like magic.

@lrz You don't really navigate around. It's all one page that fakes navigation. It replaces parts of it when you click links and manipulates address bar to not break linking.

Many web apps do this. GMail. Facebook. Twitter. Even GitHub in a simplest form.

Mastodon does too. Click on different toots and watch the address bar.

@pointlessone Oh wow I feel stupid now :-) Thanks so much for the info.

@lrz Effectively a single-page web app. Pretty much the same thing Github and Basecamp and a ton of other web things do these days.

@tvdv I guess it had never been obvious to me until I had audio playing :)

@lrz @tvdv FWIW Rails does this for free with no extra coding needed with Turbolinks

@thomasfuchs @lrz Form posts and stuff takes some additional work, even with Turbolinks.

@thomasfuchs @tvdv Oh that’s what Turbolinks is all about... the only thing I know is that it’s the first thing most people disable after having created a new project :-)

@lrz @tvdv Yes, that’s because people don’t know what they’re doing. :)

@thomasfuchs @tvdv if they were they wouldn’t be using rails in the first place? :-) :-) :-)

@lrz Turbolinks doesn’t work well with JS scripts that think a web page can’t change after it has loaded. This meant it “broke” most jquery plugins giving it a bad reputation among people who don’t really understand how things work. / @thomasfuchs

Sign in to participate in the conversation
mastodon.cloud

Generalistic and moderated instance.