0

How do IHeartRadio and 8Tracks keep the music playing without pause even when you go to a different url without any Pause?

My initial thought was that they would use something like Ajax to load content - but the fact that the browser favicon reloads makes me think it may be something else.

There are questions like this one that ask how is it possible to do so at all - but my question is how do established sites like IHeartRadio.com and 8Tracks.com do this?

If this question is not within StackOverflows scope, please let me know and I will remove it.

Ulad Kasach
  • 11,558
  • 11
  • 61
  • 87

1 Answers1

2

They are using ajax obviously.

8Tracks

Screen shot shows a browser loading 8Tracks's About us page. See initiator column (red mark) which is a javascript/xhr which means ajax.

To trigger the default browser is loading event: See: How to have AJAX trigger the browser's loading indicator

Community
  • 1
  • 1
Nik
  • 709
  • 4
  • 22
  • Thats a great catch. However, that does not explain how when you switch pages on IHeartRadio.com for example that the favicon is replaced with a loading Icon. A quick google search showed that an I Frame can replicate this, but I'm still wondering if there are any other ideas. – Ulad Kasach Oct 09 '15 at 23:26
  • 1
    Why not? Changing favicon on the fly : http://stackoverflow.com/questions/260857/changing-website-favicon-dynamically – Nik Oct 10 '15 at 01:13
  • Because its not actually the favicon - its the browser interpreting the page as loading and by coincidence having the loading icon in the same place the favicon is – Ulad Kasach Oct 10 '15 at 01:17
  • 2
    Ah! I thought you meant changing favicon. Did you mean trigger the default *browser is loading* event? See: http://stackoverflow.com/questions/1918218/how-to-have-ajax-trigger-the-browsers-loading-indicator – Nik Oct 10 '15 at 01:43