Geeks With Blogs


Locations of visitors to this page

View ► Sanjay Uttam []'s profile on LinkedIn

Add to Google Reader or Homepage

Sanjay Uttam Predominantly .NET

I usually don’t stray off the .NET path too much but…I listen to Pandora a lot.  I also happen to be a nutcase that listens to music throughout the entire night.  Well, if you ever listen to Pandora you know that after an hour it times out…and that can be pretty damn annoying even if all you have to do is go find the tab within FireFox that Pandora is living in and click a button.

In any case, I created a really old-skool workaround for this.  There are probably 900 ways to do this (another one that comes to mind that is probably easier is just using a META-REFRESH)…all I did was create a local HTML document with a frame src=”” and a JavaScript SetTimeOut function call.  Basically, it will refresh the page after 60 minutes.  Just copy and paste the code below, call it something.html (Ex: Pandora.html) and double-click.  After an hour, it will refresh…the end.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
<script type="text/JavaScript">
   2: <!--
   3: function timedRefresh(timeoutPeriod) {
   4:     setTimeout("location.reload(true);",timeoutPeriod);
   5: }
   6: //   -->
3600000 = 60 min in milliseconds    
<FRAMESET cols="99%, 1%" onload="timedRefresh(3600000);">
  <FRAMESET rows="500, 1">
      <FRAME src="">

Share this post :


Posted on Wednesday, May 20, 2009 1:44 PM | Back to top

Copyright © Sanjay Uttam | Powered by: