Does postmates support tracking_url in iframe - iframe

My code for postmates tracking_url :
<iframe src="https://postmates.com/track/del_LtCu2--LzNXzjk" width="100%" height="450" frameborder="0" style="border:0" allowfullscreen ></iframe>
But it will give an error like this:
Refused to display 'http‍s://postmates.com/track/del_LtCu2--LzNXzjk' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
I am using nginx on ubuntu 16.04.

I would say that the error message is qutie specific.
Try seeting the X-Frame-Options to
ALLOW-FROM https://yourhost.com/
Here is some explanation: X-Frame-Options

No, this is not possible. You will need to create your own map that uses the courier's current location lat/lng. You can get these values via the webhook.

Related

Youtube video won't play: An error occurred. Please try again later. (Playback ID: iSS5074BR2g5VT97)

I have some youtube videos embedded in my webpage. They display fine, but when I click on them, they wont play, just display the error above.
Here's my code:
'''
<div class="music-videos">
<iframe class="music-video" width="575" height="425"
src="https://www.youtube.com/embed?v=zM32nQ21O9E">
</iframe>
<iframe class="music-video" width="575" height="425"
src="https://www.youtube.com/embed?v=Jbg5BXUlXrs">
</iframe>
</div>
'''
When the link has the word embed on it, the VIDEO_ID is separated with a slash /.
Hence, you should change your URLs as follows:
https://www.youtube.com/embed/zM32nQ21O9E
Modified code:
<div class="music-videos">
<iframe class="music-video" width="575" height="425"
src="https://www.youtube.com/embed/zM32nQ21O9E">
</iframe>
<iframe class="music-video" width="575" height="425"
src="https://www.youtube.com/embed/Jbg5BXUlXrs">
</iframe>
</div>
If you keep getting errors, please, test this code in another computer or while you're logged out from your account. This error might be some undocumented bug or any conflict with your browser add-ons.

Iframe does not work correctly in ASP.Net?

I have a ASP.Net Web form application project.
I use Google iframe but it does not work.
Please help me.
My code:
Location="https://www.google.com/maps/place/%D8%B4%D8%B1%DA%A9%D8%AA+%D8%AC%D9%87%D8%A7%D9%86+%D8%B4%DB%8C%D9%85%DB%8C+%D8%A8%D8%B3%D9%BE%D8%A7%D8%B1%E2%80%AD/#35.7743752,51.3679948,14z/data=!4m8!1m2!2m1!1sjahan+shimi+baspar!3m4!1s0x0:0x9f32a31df4793a64!8m2!3d35.7721173!4d51.3661373"
<iframe width="100%" height="400px" scrolling="no"
src="location"></iframe>
Just use google's provided embed code:
<iframe src="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d25896.326046334627!2d51.3679948!3d35.7743752!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0x9f32a31df4793a64!2z2LTYsdqp2Kog2KzZh9in2YYg2LTbjNmF24wg2KjYs9m-2KfYsQ!5e0!3m2!1sen!2sus!4v1473145596653" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>
Your src="location" doesn't automatically read some "location" variable/parameter/whatever, it just tries to use the value "location" as url and fails.
So you need to use some way to inject the contents of your Location variable as value of src.
How to do that depends on how you generate that HTML:
For webforms you may need something like src="<%= Location %>".
For MVC it will be something like src="#Location".

How do I get a Google formkey with the new google forms

The old Google form embed code looked like:
<iframe src="https://docs.google.com/spreadsheet/embeddedform?formkey=dFdXNHV2aGthMW4sdg32enZsd2VkZWc6MQ" height="2200" width="700" frameborder="0" marginheight="0" marginwidth="0">Loading...</iframe>
The new Google form embed code looks like:
<iframe src="https://docs.google.com/forms/d/1fh95JfDQsElkjfdgLH234PwzA2bGTTwhRs7Tk6Eg/viewform?embedded=true" width="760" height="500" frameborder="0" marginheight="0" marginwidth="0">Loading...</iframe>
I am using a CMS plugin that takes an arbitrary formkey and generates the embed code.
Does anyone know how to get the formkey value using the new Google forms?
If you are using an "old" Google form (if you can see a menu bar at the top with "file" in it, then it's an old form), then look in the URL of the edit page for the form. The hash string appearing before "/edit" seems to work as the formkey. For example, suppose your edit page's URL is
https://docs.google.com/a/forms/d/###formkey_hash/edit
and it generates HTML for embedding this form in your website, as follows:
<iframe src="https://docs.google.com/forms/d/e/###embed_hash/viewform?embedded=true" width="760" height="500" frameborder="0" marginheight="0" marginwidth="0">Loading...</iframe>
and in your embedded form, you want the spreadsheet title to be hidden. You could accomplish this like
<iframe src="https://docs.google.com/forms/d/e/###embed_hash/viewform?embedded=true&formkey=###formkey_hash&ttl=0" width="760" height="500" frameborder="0" marginheight="0" marginwidth="0">
The ttl=0 pair turns off the title, but this won't work without the formkey pair.
This trick doesn't work for new Google forms, however. I don't know whether that's because (a) URL parameters don't work for new forms, (b) they do work, but the formkey is found by some other method, or (c) none of the above.

Avoid browser cache in asp.net

I try to disable the html url browser cache using programmatically.
I am developing as a site using asp.net, I need to disable the html url browser for the security reason.
I tried many ways to disable the cache but none seems to work. Any ideas?
<iframe id="iframe" src="http://www.phy.mtu.edu/basiccomputing/sample.html" runat ="server" width="200" height="300"></iframe>
As far as it's a html file you want to work with, a easy solution is to append a random number and the end of your url like this
<iframe id="iframe" src="http://www.phy.mtu.edu/basiccomputing/sample.html?12345" runat ="server" width="200" height="300"></iframe>
I don't know wich view engine you are using, so i cant provide a sample you simple copy and paste.
You have to replace ?12345with a random number like new Random().Next().ToString()
If you call a asp.net page you can control it with
Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache);
Response.Cache.SetNoStore();
more informations about that:
ASP.NET Cache Examples
hope this helps
You could attach a random parameter to the URL so the browser thinks it's a different page every time.
http://www.phy.mtu.edu/basiccomputing/sample.html?rand=[INSERT RANDOM HERE]
try
HttpContext.Current.Response.Cache.SetExpires(DateTime.UtcNow.AddDays(-1)). This site has something that can be quite helpful.

ASP.NET change in the content of the asp-page

I have a iframe in the site, and I want to add a specific text into url.. But I would like to know how I can respond to the url of the site..
How can I add<%= %> into the url,
Iam using forms, how should I be able to return the url
FOr example
<iframe src="http://www.facebook.com/plugins/like.php?href=<% %> &layout=standard&show_faces=true&width=450&action=like&colorscheme=light&height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>
The easiest way to implement this is to build the iframe html tag in runtime and then add it to a control like Literal. There are much more ways but I think this is the best way for you.
Hope it helps

Resources