|
|
#1 |
|
Major Leaguer
Join Date: Mar 2005
Location: Douglasville, GA
Posts: 462
|
Is there a way to have a Safari webpage refresh automatically every minute to every couple minutes? I have a page that updates very frequently that I need info from.
Im not really familiar with RSS but does it do something like that? I seriously doubt this site does not have a feed (if thats what it needs). |
|
|
|
|
|
#2 |
|
Moderator
Join Date: May 2003
Posts: 4,251
|
If RSS is an option, that would be excellent. Safari won't check an RSS feed more often than every 30 minutes, but other RSS readers will let you set pretty much whatever you want.
If RSS isn't an option, you could maybe do this using JavaScript. Keeping in mind I'm not a web coder at all, you could make an html file on your local hard drive with two frames: the first frame just has a JavaScript timer loop that tells the 2nd frame to load a URL every so often. |
|
|
|
|
|
#3 |
|
Major Leaguer
Join Date: Mar 2005
Location: Douglasville, GA
Posts: 462
|
I really have NO clue when it comes to Javascript. I've never had to mess with it before. I dont suppose there is another way to do it???
|
|
|
|
|
|
#4 |
|
MVP
Join Date: Apr 2004
Location: Hello London Calling
Posts: 1,636
|
Theres a hint here on changing Safari Rss update times
http://www.macosxhints.com/article.p...ery=safari+rss or you could try a Applescript like below saved as a Application Bundle (stay open) ticked. The time is set for two minutes (120) and you need to change the url. Code:
on idle tell application "Safari" activate set URL of front document to "http://forums.macosxhints.com/search.php?do=getnew" end tell return 120 end idle |
|
|
|
|
|
#5 | |||||||||||||||||||||||
|
All Star
Join Date: May 2004
Location: london on ca
Posts: 895
|
You don't need javascript - html should do. Try something along these lines: Code:
<html>
<head>
<meta **********="refresh" content="60">
</head>
<body>
<FRAMESET>
<FRAME src="http://www.macosxhints.com">
</FRAMESET>
</body>
</html>
|
|||||||||||||||||||||||
|
|
|
|
|
#6 |
|
Moderator
Join Date: May 2003
Posts: 4,251
|
Now THAT's what I was talking about. I knew someone would pony up the code.
|
|
|
|
|
|
#7 |
|
Major Leaguer
Join Date: Mar 2005
Location: Douglasville, GA
Posts: 462
|
I have been away for a while and never got to say thank you for this one. Well done.
Forgive my ignorance once again, but what app should I be using to input this HTML string? I'm afraid Im simple minded and have to be instructed like a 3 year old
Last edited by Reflect_TRUTH; 08-18-2005 at 07:13 AM. |
|
|
|
|
|
#8 |
|
Hall of Famer
Join Date: Aug 2005
Location: USA
Posts: 3,410
|
You can just use TextEdit, and cnange "http;//www.macosxhints.com" to something else. Or you can use Nvu. http://www.nvu.com Its a WYSIWYG editor based on Mozilla's editor.
|
|
|
|
|
|
#9 | |||||||||||||||||||||||
|
Prospect
Join Date: Sep 2007
Posts: 2
|
Hey, I tried this and it worked, well sort of. I had 2 issues with it, that I was looking for some guidance on. First, each time the page refreshed it returned to the top of the page, when on this website the new data is located on the bottom of page and would require me to scroll. Is there a way for it to refresh to the bottom of the page until the top of the page? Also, is there a way for the script to refresh UNTIL new data appears and then stop refreshing? Finally, when I had it set on "1" for seconds, the page continued to refresh the OLD data even after someone else told me that the page had already been refreshed with NEW data, any explanations? Thanks, |
|||||||||||||||||||||||
|
|
|
|
|
#10 |
|
Prospect
Join Date: Sep 2007
Posts: 5
|
Hello,
I too was looking for just this solution. However, I must be studying too hard because I cut-n-pasted the text in this post into TextEdit, saved it as HTML, then went to my Documents folder and clicked on the file, only to have it open a new Safari window with the HTML coding in it....not the page I wanted....just the HTML coding you see in the aforementioned posts. What am I missing? Thanks, Justin |
|
|
|
|
|
#11 | |||||||||||||||||||||||
|
Registered User
Join Date: Mar 2009
Posts: 1
|
Have a look at the source for the website you want to refresh - you should be able to use the "divs". E.g. If the section you want to refresh to is called "Portfolio" on web site www.example.com Link to www.example.com/#Portfolio That should work. Reloading old data is cos of your cache, have a play with settings (Presume you're in Safari where Cache-ing probs are common) and reload less often than every second as that will cause you problems too. 10 secs min I'd recommend. |
|||||||||||||||||||||||
|
|
|
|
|
#12 |
|
Registered User
Join Date: Jan 2010
Posts: 1
|
The frame thing works ok, if you have little more code expertice you can do AJAX / jQuery refresh.
But the idea of this post is to show how to get a non cached page everytime. You can try using Javascript to add random value. example: http://www.google.com/?rnd=(random number) will not be cached as far as the random number is different. another way is to use pragma cache=no-cache on your html. and, another way to create something more appealing is to use FLASH or JAVASCRIPT to load the webpage webpage.load("http://www.something.com" + Math.rnd() * 9999) and the parse the data on a function like : webpage.onData = function(data) { // parse the data to get the elements you need. // but this involve more development. } Google is your friend.! Greetings, Bart. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|