![]() |
Auto Refresh Safari pages?
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). |
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. |
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???
|
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 |
Quote:
Code:
<html> |
Now THAT's what I was talking about. I knew someone would pony up the code. :D
|
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 :o |
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.
|
Quote:
Thanks, |
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 |
Quote:
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. |
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. |
HTML reload not working
In Safari 5.0, the file loads the "target" page but does not refresh (as if the framset is ignored).
In Firefox 3.6.8, odd characters display (I assume related to the meta tag). Any ideas, anyone? Thanks. |
Auto Refresh Solution
Use Opera. It has the feature built in.
|
Or, in Firefox, use the add-on Reloadevery.
|
Reloadevery seems broken in OSX Firefox 3.6.8
Installed it on two different Macs without success.
|
You can save the following JavaScript as a bookmark – I prefer to store in the Bookmark Bar, but it's your choice – then select this bookmark while viewing the page to be refreshed. It will confirm the page and allow you to set the refresh delay in seconds.
Code:
javascript:(function(p){open('','',p).document.write('%3Cbody%20id=1%3E%3Cnobr%20id=2%3E%3C/nobr%3E%3Chr%3E%3Cnobr%20id=3%3E%3C/nobr%3E%3Chr%3E%3Ca%20href=%22#%22onclick=%22return!(c=t)%22%3EForce%3C/a%3E%3Cscript%3Efunction%20i(n){return%20d.getElementById(n)}function%20z(){c+=0.2;if(c%3E=t){c=0;e.location=u;r++}x()}function%20x(){s=t-Math.floor(c);m=Math.floor(s/60);s-=m*60;i(1).style.backgroundColor=(r==0||c/t%3E2/3?%22fcc%22:c/t%3C1/3?%22cfc%22:%22ffc%22);i(2).innerHTML=%22Reloads:%20%22+r;i(3).innerHTML=%22Time:%20%22+m+%22:%22+(s%3C10?%220%22+s:s)}c=r=0;d=document;e=opener.top;u=prompt(%22URL%22,e.location.href);t=u?prompt(%22Seconds%22,60):0;setInterval(%22z()%22,200);if(!t){window.close()}%3C/script%3E%3C/body%3E')})('status=0,scrollbars=0,width=100,height=115,left=1,top=1') |
Absolutely brilliant. Works perfectly; many thanks!!!
Quote:
|
No credit to me. I'm just sharing what I've found. If you do a web search for JavaScript Bookmarklets you may find other bits of JavaScript code you find useful.
|
Just the ticket
THANK YOU
I wanted this very thing, too. Useful if you are online say banking or some other thing, and you don't want to be kicked off. Obviously use with caution. |
There's also at least one Safari extension that provides this type of functionality. I'd be surprised if there aren't others.
|
THANKS SO MUCH! i've been trying to figure this out with safafi for forevvvverrrr
|
| All times are GMT -5. The time now is 03:59 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.