I got a code that refreshes the html page as per the seconds I desire. I am on an Mac and I use the TextEdit app to make the HTML file. This code works for www.apple.com but it does not work for say, https://www.bitcointalk.org or http://www.macrumors.com.
I am not sure why this is happening. All I am doing is replacing the apple URL with bitcointalk url. I know I can also do this refreshing via Safari extension, but I need this code to work.
Thanks a lot
The code I am using is:
<html>
<head>
<meta http-equiv="refresh" content="5">
</head>
<FRAMESET>
<FRAME src="http://www.apple.com/">;
</FRAMESET>
</html>
EDIT: What I am trying to do is, create this html and move it to my iPhone, so that I can do the web refresh through my phone. Right now there are only paid apps in the App store that lets you refresh a page automatically every few seconds/minute and they are not really that good.
As #esqew pointed out in their comment, the sites that aren't showing up forbid access via frames by setting the X-Frame-Options HTTP header to DENY or SAMEORIGIN.
See https://developer.mozilla.org/en-US/docs/Web/HTTP/X-Frame-Options
Related
I have a website redirecting traffic to Kayak.com, lately I noticed users that have the Kayak app installed (iOS / Android) on their device, are being redirected to the app, instead of remaining in the browser.
Sometimes the users would get a question "Open in the kayak app?", while for others it will immediately open the Kayak app.
I wanted to ask how to disable this behavior?
I want all users to remain within the browser, just open the URL in the browser without opening the app (similar behavior to Desktop).
The HTML redirection code:
<!DOCTYPE html>
<html>
<head>
<h1> HTML redirection - how to avoid opening on the app / offering "open in the app?" </h1>
</head>
<body>
<meta http-equiv="Refresh" content="1;url=https://www.kayak.com" />
</body>
</html>
I don't have control of app installations or Kayak's website behavior.
I have tried replacing the HTML redirection with PHP redirection,
And tried JS redirection as well.
Both approaches result in the same outcome (opens in the app / offers to open the app).
For convenient testings I added this code to a web page :
http://www.hotels-bargains.com/htmlredirection.php
Any idea on how to keep the users inside the browser?
There is an html page that works correctly on any Windows and Android (shows content of iframe). Hosting by Github Pages. It works on iOS version 12.5.1, but no on 14.6 (blank page on Chrome, Safari, Opera). Why?
Tried src with wikipedia - ok everything. The problem narrows down to a combination of iframe and src of apps script (that opens separately correctly)
Assume that the problem was mixed http/https according to post. Just http was in style http://www.w3.org/2000/svg, I changed to https (even removed all styles). No effect.
No log errors, just blank page. Seems like trying to load, but break and stop. I haven't ios device to debug. Feedback user.
If you have iOS 14, can try open this site. What you see blank page or access error?
Error like the next is right. It tell about you haven't access.
Refused to display 'accounts.google.com/…' in a frame because it set 'X-Frame-Options' to 'DENY
If you sign in Google Account and try again, will be error from Google Drive. I have all this on any platform in incognito mode. Don't pay attention to them.
Only interested in the case of a blank screen/stop loading like screenshot below
iOS 14.6
Windows
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Goofy</title>
<style>
html, body, iframe { width: 100%; height: 100%; margin: 0; border: 0; }
</style>
</head>
<body>
<iframe src="https://script.google.com/macros/s/AKfycbzmAfVL_ozEP69vpYvMo3t1Qlc4orPfk7eV5rWT/exec"></iframe>
</body>
</html>
Apps Script render page with XFrameOptionsMode.ALLOWALL
function doGet() {
return HtmlService.createHtmlOutputFromFile('launch.html')
.addMetaTag('viewport', 'width=device-width, initial-scale=1')
.setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL);
}
Cookies for cross-site resources are now blocked by default (iOS 13+). Source. Other platform (iOS 12, Windows, Android) while aren't do this. Such cookies need to verify user on github.io with iframe and google src. That's why I see the blank page on iOS 14.
Solve is go to browser's setting and allow 3rd party cookies.
Thanks Shivam's answer
It’s browser side problem. Due to 3rd party cookies, Safari will block the content. Unless user set on their own, the preference to allow all cookies. Until now, I only know Safari that will do this action. Other browser, i think all okay with content in iframe that come from 3rd party.
You can't frame certain websites, because the server won't allow you for security reasons (Imagine that a random page iframes your gmail and steals all your data). So you will have to modify the macro on google scripts and maybe ask other question for what you are trying to do. X-Frame-Options
i have create an iframe look like this :
<iframe src="https://mychatbot.com/chat?token= adadasdasd>
it doesn't work/load in IOS device
But when i change that iframe to
<iframe src="//mychatbot.com/chat?token=adadasdasd>
And bammm, it work !!! i think we just need get rid of http/https out of our "src"
I am facing an issue with mobile version of my site. The site is hosted on a different domain.
I Tracked down the issue and saw that its being caused by the being wrapped on top of my actual html code.
Here is a snippet:
<html>
<head>
<title>Where are you</title>
<meta name="robots" content="noindex, nofollow">
<meta name="description" content="Let’s your friends and family know about your where about.">
<meta name="keywords" content="Stay connected, Plan meetup, Unreachable friend, Share location, Share photos">
</head>
<frameset rows="100%">
<frameset cols="100%">
<frame src="http://wru.buttur.com" frameborder="0">
#document
</frameset>
</frameset>
</html>
My website is getting loaded inside "#document".
Can i do some configuration on my domain to prevent this from happening.
I know this is old, but I am responding because we had a similar problem where some outside entity managed a website, and we took over after it became broken.
It was a wordpress site and everything was being wrapped inside a frameset. We were baffled by the fact that direct browser requests to hosted javascript files would work fine, but within the page it would become wrapped in frames in the network response.
Even direct jQuery.getScript() calls from external sites would exhibit the scenario. Again, worked fine if typed into browser url bar.
Turns out there's something called DNS frame forwarding.
Here's a topic that covers the scenario:
https://stackoverflow.com/questions/7083391/godaddy-dns-forward-to-ip-adds-frames-to-html
Edit:
Looks like a moderator removed that post. How strange!! Too bad as well, that post had exactly the right answer with exactly the right description.
Well basically anyone coming across this, just research DNS frame forwarding. You'll find your answer there.
Terms for google:
website wrapped in frameset
javascript responds in frame
css in frame
Resource interpreted as Stylesheet but transferred with MIME type text/html
Uncaught SyntaxError: Unexpected token <
I am trying to set up an iFrame to show a form from another domain within our company. And testing it in Chrome or Firefox works just fine.
The problem is, for IE 10, instead of showing the form, the browser is instead showing a blank page in the iFrame.
I've broken it down to a very simple test.html on my desktop. The Developer's Tools show that the network call not only works - but it registers loading files that are being included in the page I'm trying to call. I've even seen the debug statements in the form's javascript firing, and ajax calls running. But the iFrame is still showing blank.
I have hunted and searched and cannot figure out how to make this work.
The calling page has:
<!doctype html>
...
<DIV><iframe height="400" width="100%" src="http://my.domain.com/myForm?userName=clicky&email=cMcTesterton#domain.com"></iframe></DIV>
The called page has as its first two lines:
<%# page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<!doctype html>
Which, of course, changes to simply
<!doctype html>
I am using URL binding, so there isn't an extension to speak of.
I have gone into IE's Internet Options -> Security -> Custom level ... -> miscellaneous to enable Launching Programs and files in an IFRAME and Navigate windows and frames across different domains
I can't even figure out what else to look for. It especially confuses me that according to the console, it has to be reading the page I'm trying to bring up. It just isn't showing it.
You have to configure, either (1) your site http://my.domain.com or (2) the page located in the site http://my.domain.com to send out the X-Frame-Options meta tag.
The X-Frame-Options meta tag is basically a hint to tell the browser that it's safe to render the page inside an iframe.
Option 1 - configure your webserver to send out the X-Frame-Options meta tag
<system.webServer>
...
<httpProtocol>
<customHeaders>
<add name="X-Frame-Options" value="ALLOW-FROM http://my.otherdomain.com" />
</customHeaders>
</httpProtocol>
...
</system.webServer>
Option 2 - configure your page (the one referenced at src="http://my.domain.com/myForm?userName=clicky&email=cMcTesterton#domain.com") to send out the X-Frame-Options meta tag
<head>
<meta name="X-Frame-Options" content="ALLOW-FROM http://my.otherdomain.com">
....
</head>
Source
I am having trouble getting consistent behaviour from my Facebook Like button. I have created this example which I believe to be the simplest possible implementation...
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<title>Untitled Page</title>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1" type="text/javascript"></script>
</head>
<body>
<fb:like href="http://www.stackoverflow.com" layout="button_count" show_faces="false" width="450" font=""></fb:like>
</body>
</html>
I have saved this as an HTML file which I am serving from a webserver running on my machine (localhost - I assume this won't be a problem as the page I'm 'liking' in this example is public-facing).
If I try this in Google Chrome, it appears to work without a problem.
When I try it in IE9, the like button renders, but when I click it, a new IE window opens which is mostly blank apart from a blue Facebook header. The URL of this page is: http://www.facebook.com/connect/connect_to_external_page_widget_loggedin.php?social_plugin=like&external_page_url=http%3A%2F%2Fwww.stackoverflow.com%2F
This is really confusing me as the example is about as simple as it gets! Any help would be really appreciated!
EDIT: A little more information. If I go to Facebook in IE9 and log-out, then try my like button again, a new window still opens but this time I can login. After logging in, though, I still get taken to the same blank page.
In desperation, I tried accessing my local page from http://127.0.0.1 instead of http://localhost
This appears to have solved (or at least worked around) the problem.
I would love to hear from anyone who can explain what this is all about!!