opera

How to determine the Opera browser using JavaScript

岁酱吖の 提交于 2019-12-18 03:12:19
问题 I want to determine that the browser of the client machines in Opera or not using JavaScript, how to do that? 回答1: The navigator object contains all the info you need. This should do: navigator.userAgent.indexOf("Opera"); 回答2: Now that Opera uses the Chrome rendering engine, the accepted solution no longer works. The User Agent string shows up like this: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.52 Safari/537.36 OPR/15.0.1147.132

HTML5 - cache manifest working great on Chrome but not on Firefox and Opera

最后都变了- 提交于 2019-12-18 03:04:32
问题 I am developing a web app for offline use, thus I need to use the application cache functionality. Everything works great on Chrome (15.0.874.106) but is doesn't work on Firefox (7.0.1) and Opera (11.52). This is my cache manifest file cache.manifest.php (I have reduced it to the bare minimum): <?php header("Cache-Control: max-age=0, no-cache, no-store, must-revalidate"); header("Pragma: no-cache"); header("Expires: Wed, 11 Jan 1984 05:00:00 GMT"); header('Content-type: text/cache-manifest');

Wingdings font family does not seem to work on Firefox and Opera

只愿长相守 提交于 2019-12-18 01:29:09
问题 I was using the Wingdings font in the CSS for some symbols like a pencil and a home icon. It worked on IE, Chrome and Safari but not in Firefox and Opera. I googled it but did not find any better solution. Why doesn't it work in Firefox? I do need to use those icons, is there any way to use Wingdings in Firefox? 回答1: Mozilla and Opera are standard-compiliant. Wingdings is not standard (what a surprise coming from Microsoft) because not mapped to Unicode, and so should never be used on a

Set up TLS proxy for Google Cloud Endpoint APIs

我的梦境 提交于 2019-12-17 23:18:38
问题 I have been viewing my Google App Engine endpoint APIs in the API explorer (localhost) without issues, now am getting this: in full it says: You are exploring an API that is described or served via HTTP instead of HTTPS. This is insecure and may be blocked by your browser. To fix this, set up a TLS proxy for your API. Alternatively, you can tell your browser to allow active content via HTTP at this site (on Chrome, click the shield in the URL bar), but this will not improve security or

How do I stop Opera from caching a page?

南楼画角 提交于 2019-12-17 20:24:28
问题 I am trying to get Opera to re-request a page every time instead of just serving it from the cache. I'm sending the 'Cache-control: no-cache' and 'Pragma: no-cache' response headers but it seems as if Opera is just ignoring these headers. It works fine in other browsers - Chrome, IE, Firefox. How do I stop Opera from caching pages? What I want to be able to do is have Opera re-request a page when the user clicks the Back button on the browser. 回答1: As a user, I absolutely detest pages that

CSS alternative for display:box for IE and Opera?

不问归期 提交于 2019-12-17 16:49:47
问题 I am using display:box for a flexible width div with three boxes of equal size and with equal spacing. This works fine for Firefox, Safari and Chrome, but not in IE and Opera. I am wondering what the best alternative method for IE and Opera would be. Here is the display:box CSS: .box { display: -moz-box; display: -webkit-box; display: box; width: 100%; } .box1, .box2, .box3 { -moz-box-flex: 1; -webkit-box-flex: 1; box-flex: 1; width: 0; } .box2, .box3 { margin-left: 20px; } And the HTML: <div

Opera won't load some JavaScript files

吃可爱长大的小学妹 提交于 2019-12-17 16:28:19
问题 I have a web page that loads in an IFRAME, that runs correctly in IE and Firefox but not in Opera. Which I hate, because I've been an Opera user for years. And I wrote this thing. :-) The problem is that Opera is not loading some of the JavaScript files that comprise the page. I suspect that it is related to the fact that the page itself is loaded via HTTPS and the included files via HTTP from a different host and port. I believe Opera allows that, but Dragonfly's Net tab doesn't even show an

Post 和 Get 请求

最后都变了- 提交于 2019-12-16 15:41:03
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 什么是 HTTP? 超文本传输协议(HTTP)的设计目的是保证客户机与服务器之间的通信。HTTP 的工作方式是客户机与服务器之间的请求-应答协议。web 浏览器可能是客户端,而计算机上的网络应用程序也可能作为服务器端。 举例:客户端(浏览器)向服务器提交 HTTP 请求;服务器向客户端返回响应。响应包含关于请求的状态信息以及可能被请求的内容。 两种 HTTP 请求方法:GET 和 POST 在客户机和服务器之间进行请求-响应时,两种最常被用到的方法是:GET 和 POST。 GET - 从指定的资源请求数据。 POST - 向指定的资源提交要被处理的数据 GET 方法 请注意,查询字符串(名称/值对)是在 GET 请求的 URL 中发送的: /test/demo_form.asp?name1=value1&name2=value2 有关 GET 请求的其他一些注释: GET 请求可被缓存 GET 请求保留在浏览器历史记录中 GET 请求可被收藏为书签 GET 请求不应在处理敏感数据时使用 GET 请求有长度限制 GET 请求只应当用于取回数据 POST 方法 请注意,查询字符串(名称/值对)是在 POST 请求的 HTTP 消息主体中发送的: POST /test/demo_form.asp HTTP/1.1

如何强制浏览器重新加载缓存的CSS / JS文件?

空扰寡人 提交于 2019-12-14 18:17:26
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 我注意到一些浏览器(特别是Firefox和Opera)非常热衷于使用 .css 和 .js 文件的缓存副本,即使在浏览器会话之间也是如此。 当您更新这些文件之一而用户的浏览器继续使用缓存的副本时,这会导致出现问题。 问题是:强迫用户浏览器在文件更改后重新加载文件的最优雅方法是什么? 理想情况下,该解决方案不会强制浏览器在每次访问页面时重新加载文件。 我将发布自己的解决方案作为答案,但是我很好奇是否有人有更好的解决方案,我将让您决定。 更新: 经过一段时间的讨论后,我发现 John Millikin 和 da5id 的建议很有用。 事实证明有一个术语: 自动版本化 。 我在下面发布了一个新答案,该答案是我原来的解决方案和约翰的建议的结合。 SCdF 建议的另一个想法是将伪查询字符串附加到文件中。 (一些由 pi 提交的自动使用时间戳作为伪查询字符串的Python代码。) 但是,关于浏览器是否将使用查询字符串缓存文件存在一些讨论。 (请记住,我们希望浏览器缓存文件并在以后的访问中使用它。我们只希望它在更改后再次获取文件。) 由于尚不清楚假查询字符串会发生什么,因此我不接受该答案。 #1楼 有趣的帖子。 在阅读了所有答案之后,再加上我从未遇到过“伪造”查询字符串的任何问题(我不确定为什么每个人都不太愿意使用它)

本地存储与Cookie

徘徊边缘 提交于 2019-12-14 17:32:06
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 我想通过将所有cookie移到本地存储中来减少其加载时间,因为它们似乎具有相同的功能。 除了明显的兼容性问题以外,使用本地存储替换cookie功能是否有任何利弊(特别是性能方面的优势)? #1楼 好吧,本地存储速度很大程度上取决于客户端使用的浏览器以及操作系统。 Mac上的Chrome或Safari可能比PC上的Firefox快得多,尤其是使用较新的API时。 与往常一样,测试是您的朋友(我找不到任何基准)。 我真的没有看到Cookie与本地存储的巨大差异。 另外,您应该更加担心兼容性问题:并不是所有的浏览器都已经开始支持新的HTML5 API,因此cookie是提高速度和兼容性的最佳选择。 #2楼 Cookies和本地存储有不同的用途。 Cookies主要用于读取 服务器端 ,本地存储只能由 客户端 读取。 因此,问题是,在您的应用程序中,谁需要此数据-客户端还是服务器? 如果它是您的客户端(您的JavaScript),则一定要切换。 通过在每个HTTP标头中发送所有数据来浪费带宽。 如果是您的服务器,则本地存储不是那么有用,因为您必须以某种方式(使用Ajax或隐藏的表单字段或其他方式)转发数据。 如果服务器仅需要每个请求的全部数据的一小部分,则可以这样做。 无论哪种方式