iframe

How can I prevent an iframe displaying an email to load images and other email trackers?

自作多情 提交于 2020-03-25 18:08:38
问题 We have a web admin panel in which the agents can see conversations with customers. Those conversations are the result of importing normal emails thru an IMAP connection. We grab the "untouched" mailbox files and we store them in a database. Then we post-process the files to index by "from", "to", "date" and so on and so forth. Up to here, okey. We can seek all the emails involved with a client and render them at will. Then when the agent looks for a customer in the web admin panel and opens

How can I prevent an iframe displaying an email to load images and other email trackers?

为君一笑 提交于 2020-03-25 18:04:06
问题 We have a web admin panel in which the agents can see conversations with customers. Those conversations are the result of importing normal emails thru an IMAP connection. We grab the "untouched" mailbox files and we store them in a database. Then we post-process the files to index by "from", "to", "date" and so on and so forth. Up to here, okey. We can seek all the emails involved with a client and render them at will. Then when the agent looks for a customer in the web admin panel and opens

Selenium-Switch与SelectApi接口详解

给你一囗甜甜゛ 提交于 2020-03-25 08:41:01
Switch 我们在UI自动化测试时,总会出现新建一个tab页面、弹出一个浏览器级别的弹框或者是出现一个iframe标签,这时我们用WebDriver提供的Api接口就无法处理这些情况了。需要用到Selenium单独提供的模块switch_to模块 引用路径 # 第一种方式可以通过直接导入SwitchTo模块来进行操作 from selenium.webdriver.remote.switch_to import SwitchTo # 第二种方式是直接通过Webdriver的switch_to来操作 driver.switch_to 其实webdriver在以前的版本中已经为我们封装好了切换Windows、Alert、Iframe,现在依然可以使用,但是会被打上横线,代表他已经过时了,建议使用SwitchTo类来进行操作。 SwitchToWindows handles = driver.window_handles # SwitchToWindows接受浏览器TAB的句柄 driver.switch_to.window(handles[1]) SwitchToFrame # SwitchToFrame支持id、name、frame的element # 接受定位到的iframe的Element,这样就可以通过任意一种定位方式进行定位了 frameElement = driver

Media queries within an iframe, or SCORM without frames

半腔热情 提交于 2020-03-25 04:15:10
问题 I have a responsively designed (using media queries) web based training (WBT) lesson. By default, this WBT does not use any frames, for accessibility concerns and etc. However, when deployed from a SCORM LMS, it uses a file which acts as a frameset, for the SCORM communication. Like this: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Title of Course Here</title> <script src="../common/scripts/scorm.js"></script> <style> html, body {margin:0; overflow:hidden; padding:0;

跨域详解

♀尐吖头ヾ 提交于 2020-03-23 16:17:53
https://segmentfault.com/a/1190000011145364 什么是跨域? 跨域是指一个域下的文档或脚本试图去请求另一个域下的资源,这里跨域是广义的。 广义的跨域: 1.) 资源跳转: A链接、重定向、表单提交 2.) 资源嵌入: <link>、<script>、<img>、<frame>等dom标签,还有样式中background:url()、@font-face()等文件外链 3.) 脚本请求: js发起的ajax请求、dom和js对象的跨域操作等 其实我们通常所说的跨域是狭义的,是由浏览器同源策略限制的一类请求场景。 什么是同源策略? 同源策略/SOP(Same origin policy)是一种约定,由Netscape公司1995年引入浏览器,它是浏览器最核心也最基本的安全功能,如果缺少了同源策略,浏览器很容易受到XSS、CSFR等攻击。所谓同源是指"协议+域名+端口"三者相同,即便两个不同的域名指向同一个ip地址,也非同源。 同源策略限制以下几种行为: 1.) Cookie、LocalStorage 和 IndexDB 无法读取 2.) DOM 和 Js对象无法获得 3.) AJAX 请求不能发送 常见跨域场景 URL 说明 是否允许通信 http://www.domain.com/a.js http://www.domain.com/b.js

js 图片上传(iframe)

安稳与你 提交于 2020-03-23 05:08:48
//上传图片构造函数 function FileUploader(targetId, uploadInputId, uploadFormId, picAreaId, delUrl, targetInput, fileName) { this.targetId = targetId; this.uploadInputId = uploadInputId; this.uploadFormId = uploadFormId; this.picAreaId = picAreaId; this.delUrl = delUrl; this.targetInput = targetInput; this.iframeName = undefined; //当前iframe的名字 this.fileName = fileName; //当前iframe的名字 return { upload: this.upload, apendPic: this.apendPick }; }; //开始上传 FileUploader.prototype.upload = function () { $('#' + this.targetId).click(function () { $('#' + this.uploadInputId).click(); }); }; //添加图片 FileUploader

Unable to access iframe content (same-origin policy)

大城市里の小女人 提交于 2020-03-23 04:08:08
问题 I have the following page <!DOCTYPE html> <html> <script type="text/javascript"> function loopLink(i) { window.open($('#iframe_a').contents().find('.image-navigator-mid a').attr('href'),'iframe_a'); setTimeout(function() { if (i < 3) loopLink(i+1); }, 5000); } // Wait for the page to load first window.onload = function() { var a = document.getElementById("mylink"); a.onclick = function() { loopLink(0); return false; } } </script> <iframe src="http://nanofate.us/content/fate-new-hair-style

基于iframe的移动端嵌套

你。 提交于 2020-03-22 20:03:26
需求描述 上上周接到了新的项目,移动端需要做一个底部有五个导航,点击不同的导航页面主体显示不同的页面,其中两个页面是自己做,而另外三个页面是引用另外三个网址,其中两个网址为内部项目,另外一个为外部(涉及跨域)。 问题 考虑再三后最省时间成本的就是使用iframe,虽然在移动端使用,我的内心是很拒绝的,不过其他方案调研了下都不太符合现状。每点击一次加载一个新的iframe,比较懒,所以两个新页面也做成了iframe,在做的过程中出现了如下问题,这里总结一下: 1.嵌入的iframe页面无法滚动 2.meta元素的ontent不一致,外部的页面使用width=device-width,而引用的其中一个页面的width=640,这导致那个页面渲染的时候无法全屏缩小 3.ios下其中的一个页面莫名其妙的扩大 4.iframe的页面a标签的锚点失效 5.当我点击a加载了a的iframe页面,在切换到b,这个时候b页面字体莫名的变大 6.导航栏有个样式要求,active的时候icon是为红色的icon,其他状态下则为灰色的。其中的一个需求为返回的时候从哪里点出去返回到哪里 7.某个安卓机后返回无法重新加载iframe 解决 声明嵌入的iframe页面其中4个都是内部项目,同源的,所以大部分处理的问题不存在跨域问题。 1.嵌入的iframe页面无法滚动 在iframe外层包裹一个div

IE won't start session from an iframe?

时光毁灭记忆、已成空白 提交于 2020-03-22 08:14:06
问题 The task was to bypass login form on remote server with a session_id acquired through a call to server's web API. So that user wouldn't have to login twice. Since there's no way to set cookies for different domain. What we came up to was - put a little file on remote server, to which we pass encrypted session_id from hidden iframe and which is supposed to start a proper session for a remote app, which is then loaded in another iframe. This approach works fine in FF/Chrome, but not IE...

开发感悟

自作多情 提交于 2020-03-22 06:01:22
1)out.print("<script language='javascript'>alert('下载成功!\\n"+rst+"');</script>"); 在服务器端生成JAVASCRIPT处理换行要用 “\\n ”转移序列,如果是在页面就直接用“\n” 2)页面不提交保存:可以用<iframe>嵌在页面中,提交到此iframe进行保存,比AJAX和XMLHTTP更简洁。 马上要到新公司上班了,外资公司待遇、福利都好很多,但是压力也陡然大了不少,有点茫然,也有兴奋和激动,事在人为吧,努力总有汇报,抽空还要对这6年的工作在心灵深处做一个总结。 来源: https://www.cnblogs.com/willpower/archive/2008/08/22/1273910.html