title: Python script on refreshing a web page, count value varies
body: <p>I'm new to developing python scripts, but i'm trying to develop a script that will inform me when web page has been updated. For each check I use a counter to see how many times the program has run until the site has updated in someway.</p>
  
  <p>My doubt is that, when I feed the url "stackoverflow.com", my program can run upto 6 times, however when I feed the url "stackoverflow.com/questions" the program runs at most once. Both sites on refreshing seems to be updating their questions often. But could someone explain to me why is there a big difference on the number of times the program runs?</p>
  
  <pre><code>  import urllib2
  import time
  refreshcnt=0
  url=raw_input("Enter the site to check");
  x=raw_input("Enter the time duration to refresh");
  x=int(x);
  url="http://"+url
  response = urllib2.urlopen(url)
  html = response.read()
  htmlnew=html
  while html==htmlnew:
      time.sleep(x)
      try:
          htmlnew=urllib2.urlopen(url).read()
      except IOError:
          print "Can't open site"
          break
      refreshcnt+=1
      print "Refresh Count",refreshcnt
  print("The site has updated!");
  </code></pre>