I have this code which helps me to reload a page. The issue is, it works with Chrome and Firefox but not with Safari, it loops continually.
Can you help me why is this happening?
This is the code:
top.location.href=\'http://www.facebook.com/pages/Penelope-NS/327068327378161?sk=app_338788849530374\';
Can i do this otherwise?
Thanks
I found this code: Where am i supposed to insert it?
headers 'Content-Type' => "text/html;charset=utf-8",
'Last-Modified' => Time.now.httpdate,
'P3P' => 'CP="CAO PSA OUR"',
'X-UA-Compatible' => 'IE=edge'
Try to use window.top.location = "NEW_URL"
for the IE. Or, if your code is run from iframe, parent.location = "NEW_URL"
Update:
To address the same page where the script itself resides: self.location.href = newURL;
To address another page in a frameset: window.top.frameName.location.href = newURL;
or (hypercorrect):
window.top.frames['frameName'].location.href = newURL;
top.location.href
depends on browser, and top.location popup allowance. most browsers should allow this, but older mac browsers tend to not allow this.
Update Safari to the latest version and it should work. For older safari browsers, it doesn't support top.location
script execution.