opera

Python basehttpserver not serving requests properly

浪尽此生 提交于 2019-12-06 07:26:30
问题 I'm trying to write down a simple local proxy for javascript: since I need to load some stuff from javascript within a web page, I wrote this simple daemon in python: import string,cgi,time from os import curdir, sep import urllib import urllib2 from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer class MyHandler(BaseHTTPRequestHandler): def fetchurl(self, url, post, useragent, cookies): headers={"User-Agent":useragent, "Cookie":cookies} url=urllib.quote_plus(url, ":/?.&-=") if post:

微软不会彻底杀死Edge浏览器

佐手、 提交于 2019-12-06 07:01:03
微软日前官方宣布,将会放弃自家浏览器引擎,转而拥抱占统治地位的Google Chromium,给整个市场投下了一枚“重磅炸弹”,无论对微软还是对大量用户都会产生广泛的影响。 但因为微软公布的消息也并不多,很多细节之处并未做明确解释,也引发了不少误会。SoftPedia就特意集中解读了几个相关问题: 1、微软不会杀死Edge 首先也是最重要的,Edge浏览器并不会被抛弃,只是内核引擎从微软自己的EdgeHTML换成Google Chromium。 更进一步地,Chrome的市场份额超过60%,是绝大多数网站、应用的优先优化对象,Edge切换引擎后也能享受同样的待遇,而目前对Edge支持不完善的网站依然比比皆是。 2、Edge外观基本不变 事实上,Edge不仅不会死,未来甚至看起来和现在一模一样,因为只是内核更换,并不涉及UI界面调整,不知道的用户根本就不会注意到内核已经变了。 当然,涉及到一些功能和应用的时候,Edge会有一些局部调整。 3、Edge将支持Chrome全部扩展 采用Chromium内核之后,Edge浏览器将直接兼容支持Chrome现有的所有扩展。 这和其他浏览器采用Chromium引擎之后是一样的,比如Opera、Vivaldi,微软也确认了这一点。 4、Edge会更频繁升级 Edge浏览器现在最为诟病的地方就是升级太慢,每半年才会跟着Windows 10系统更新一次

How to access local server on a PC using Opera Mobile

房东的猫 提交于 2019-12-06 05:00:50
I am trying to test my website on Opera Mobile on my PC. But I am not able to connect to the local server using the mobile browser. Could any one of you tell me what all settings need to be changed in order to make this thing work? Your answers will be greatly appreciated. Thanks in advance, Yamini Using Opera Mobile in non turbo or non mini mode should work for accessing your locally hosted server. Try going into the Settings of Opera Mobile and turning off Compression/Mini/Turbo . Then you should be able to access your localhost/127.0.0.1 hosted site. Alternatively, try using the IP address

替代传统XMLHttpRequest的fetch方法实现ajax

折月煮酒 提交于 2019-12-05 19:29:06
FETCH API提供了一个JavaScript接口,用于访问和操作HTTP管道的某些部分,例如请求和响应。它还提供了一种全局fetch()方法,它提供了一种简单、逻辑的方法来跨网络异步地获取资源。 与jquery.ajax()方法不同的两点: 1、即使响应返回404、500等错误,它也不会出错,只会返回一个网络错误。 2、默认情况下,fetch不会发送和返回cookie。但可以通过初始化参数添加这项功能,var init = {credentials: 'include' // 请求带上cookies}。这点在需要权限验证的操作时一定要注意。 基础用法: fetch('http://example.com/movies.json') .then(function(response) { return response.json(); }) .then(function(myJson) { console.log(myJson); }); Supplying request options // Example POST method implementation: postData(`http://example.com/answer`, {answer: 42}) .then(data => console.log(data)) // JSON from `response

What is the correct way to detect Opera using jQuery?

余生颓废 提交于 2019-12-05 15:02:20
问题 Amazon.com recently updated their javascript, and it's causing problems with some Opera browsers. Their browser detection code looks like so, but it's faulty: function sitbReaderIsCompatibleBrowser() { if (typeof(jQuery) == 'undefined') { return false; } else { var version = jQuery.browser.version || "0"; var splitVersion = version.split('.'); return ( (jQuery.browser.msie && splitVersion[0] >= 6) // IE 6 and higher || (jQuery.browser.mozilla && ( (splitVersion[0] == 1 && splitVersion[1] >= 8

How do I simulate a modal dialog from within an Applet?

和自甴很熟 提交于 2019-12-05 14:02:25
On setVisible(true), I call the following code to start a modal dialog: private synchronized void startModal () { try { if (SwingUtilities.isEventDispatchThread()) { EventQueue theQueue = getToolkit().getSystemEventQueue(); while (isVisible()) { AWTEvent event = theQueue.getNextEvent(); Object source = event.getSource(); if (event instanceof ActiveEvent) { ((ActiveEvent) event).dispatch(); } else if (source instanceof Component) { ((Component) source).dispatchEvent(event); } else if (source instanceof MenuComponent) { ((MenuComponent) source).dispatchEvent(event); } else { System.err.println(

CSS完美兼容IE6/IE7/FF的通用方法

半腔热情 提交于 2019-12-05 14:00:24
CSS完美兼容IE6/IE7/FF的通用方法 一、 CSS HACK 以下两种方法几乎能解决现今所有 HACK . 1、 !important 随着IE7对!important的支持, !important 方法现在只针对IE6的HACK.(注意写法.记得该声明位置需要提前.) <style> #wrapper { width: 100px!important; /* IE7+FF */ width: 80px; /* IE6 */ } </style> 2、IE6/IE77对 FireFox *+html 与 *html 是IE特有的标签, firefox 暂不支持.而 *+html 又为 IE7特有标签. <style> #wrapper { #wrapper { width: 120px; } /* FireFox */ *html #wrapper { width: 80px;} /* ie6 fixed */ *+html #wrapper { width: 60px;} /* ie7 fixed, 注意顺序 */ } </style> 注意: *+html 对IE7的HACK 必须保证 HTML顶部 有如下声明: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3

Can safari/chrome/opera make ajax requests while an upload is in progress?

我的未来我决定 提交于 2019-12-05 12:58:20
Basically i am making a simple ajax request function upload(){ setInterval(function callMeOften() { $.ajax({ method: 'get', url : 'uploadinfo.php?unique_id=<?php echo $some_uniq_id; ?>', dataType : 'text', success: function(text){ updatebar(text); }, error: function (XMLHttpRequest, textStatus, errorThrown) { alert(XMLHttpRequest.status); alert(XMLHttpRequest.responseText); } }); }, 5000); } function updatebar(per){ $('#updateMe').animate({"width" : per}); } to a php script $unique_id = $_GET['unique_id']; $progress = uploadprogress_get_info($unique_id); if(function_exists("uploadprogress_get

load image in canvas fail under Internet Explorer 9 and opera

女生的网名这么多〃 提交于 2019-12-05 12:36:15
<!DOCTYPE html> <html> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <script src="resources/js/jquery-1.7.2.min.js"> </script> ... ... <script> ... ... function draw(screen, data) { if (screen.document.getElementById("screen") == null){ screen.document.write('<div id="screen" style="width:' + data.maxX + '; height:' + data.maxY + '; margin: auto;" >' + '<canvas id="screenCanvas" width=' + data.maxX + ' height=' + data.maxY + 'style="border:2px solid #000000;color:#000000;" > </canvas></div>'); } var canvas = screen.document.getElementById('screenCanvas'); var context = canvas

<noscript> not working in Opera 11?

你说的曾经没有我的故事 提交于 2019-12-05 09:54:46
I am testing my noscript tags which display content when javascript is disabled, this works in Safari, Chrome, Firefox, Camino, IE6, IE7, IE8, IE9, basically everything but Opera (I'm running version 11, not sure if its isolated to that version). In Opera 11 nothing is displayed... is the noscript tag not supported? and what is the alternative? Nothing surprising: <noscript>Please enable JavaScript.</noscript> Located between the body tags. <html> <body> <script>alert('Hello World');</script> <noscript>Hello World!</noscript> </body> </html> Are you sure you disabled javascript in Opera: Menu