1

I want to create a web page that contains an (Flex/Flash) audio player that doesnt get reloaded when the page reloads. Currently, i am popping out the player in a new window. Please check http://www.paadal.com to see it in action.

What i want to achieve is to have the player in the same window, but it shouldnt reload. I am sure many of you will say use AJAX to prevent reloading of page like songza.fm. But the problem is search engines cannot index AJAX applications. This is true for a full fledged Flex app as well.

Is there any way to have the player in the same window? but not reload.

Thanks

4 Answers 4

3

Just add Ajax to existing page hierarchy, change each link to ajax call after page load (with javascript) and only reload content of some container. If you do it that way, search engines (and users without JS, with mobile phones for example) can access your page, and users with JS enabled can get bonus as music player

1
  • This is what amiestreet.com does also. It changes links like <a href="artist"> into <a href="#artist"> on the client side. Then it uses something like the jQuery History plugin mikage.to/jquery/jquery_history.html to turn the #artist call into a AJAX request for new page content. Someone without javascript (search engines) would navigate around the site and index it as usual.
    – DavGarcia
    Commented Jan 11, 2010 at 19:44
1

No, you cannot have a single element exempt from a page-reload, not without loading portions of the page via asynchronous calls to the server. When a window refreshes, it flushes the DOM out, including your mp3 player.

4
  • i was thinking about having the player in a different frame. Would that work? Is using frames advisable? Commented Jan 11, 2010 at 19:20
  • Aravindan, no. The only way would be to place the music in a different window.
    – Sampson
    Commented Jan 11, 2010 at 19:41
  • Well, frames are technically possible but bring a heap of additional problems to worry about. Alternatively, there is at least one Flash Music player that aims to keep a near-constant stream of music playing (well, obviously with interruptions but they are kept as short as technically possible) even when switching between HTML pages - I forgot its name but it should be possible to find by asking on SO or creative Googling. I never got around to actually testing it, though. The simplest best solution is a popup window.
    – Pekka
    Commented Jan 11, 2010 at 21:26
  • Pekka, I think he was referring to iframes. Since using traditional frames would bust the address bar reliability and cause it to be static to the browser.
    – Sampson
    Commented Jan 11, 2010 at 21:28
0

saying "searching engines cannot index AJAX apps" is totally dependent on how the application is written, there are plenty of ways to write an application that is still spider-able and plenty of other techniques for indexing (like www.sitemaps.org implimented by most major search vendors)

You can not maintain anything in a browsers memory after leaving the page (which is implied by a page reload)

For your use, it sounds like using old HTML frames/framesets could easily solve your issue, with a hidden frame containing your audio and the rest of your site in the main frame window.

3
  • interesting. Pardon me if the question is trivial. So, i can create a hidden frame using javascript and attach it to my parent frame. When the user reloads the page,only the parent frame gets reloaded, not the one i created. The player is in hidden frame, so audio isnt interrupted on refresh. Did i interpret your answer correctly? Commented Jan 11, 2010 at 19:52
  • Aravindan, if the frame is within the parent, and the parent is refreshed, the frame will be refreshed too.
    – Sampson
    Commented Jan 11, 2010 at 19:54
  • ...by "hidden" I was referring to a frame that has a width or height of zero, not in the CSS sense. I have to say that although I can see an easy path to using frames, I would NOT recommend them since they are Why not take some time to deconstruct how The Hype Machine does it (hypem.com) Commented Jan 12, 2010 at 1:35
0

It depends on the design of your website. You can us a standard html background sound, embedded media player or flash player on your main web page. The others pages will have to be used as a single pop up layered into each other. this will cause your music from the main page to play and allow you to navigate throughout your website because you linked the popup pages. To return to the main page use a close window script .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.