Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Html question : href to a file : how to make it dynamic link?

 
Harsha Jay
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a html page and it points to a file, It shows the file contents.
When ever I refresh the browser, it displays the updated file
Is there a way fo the browser to dynamically display the file contents whenever a file changes without having to refresh?

-------------------------------------------
Thanks for reading
Harsha
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are going to have to refresh the page but there might be a way to make it less dramatic.
You may want to add an iframe to your page where the content is displayed. This way you can refresh the iframe page and the rest of the page will not be affected.
Eric
 
Harsha Jay
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eric,
My question was to get away from refreshing manually, How can I automatically do it?
Is there some way of dynamically achieving this functionality
------------------
Additional info: I am displaying the log-file from the appserver to the browser using the 'ln' command to create links. So I need to let the browser to show the logs when the server is running.
If the above works then I do not have to log in to the Unix box and tail the logs
Thanks
Harsha
 
Yuriy Fuksenko
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Choose one from the following:
All examples reload the page after 3 second
1.
<head>
<META HTTP-EQUIV="Refresh" CONTENT="3;URL=http://www.some.org/some.html">
</head>
2.
<script>self.setTimeout("self.location.reload()", 3000);</script>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic