browser

Do browsers need to re-download customized fonts every time they access a website?

夙愿已清 提交于 2020-01-12 05:31:46
问题 Suppose I have a website in which I have customized fonts, and all the .otf files are about 1MB. Now, when a user visits the website, the fonts will be downloaded. The question is, will these fonts remain in the user's browser as installed all the time? I.e. Even if the user turns off the browser, will the fonts remain in there? Or are .otf files just like all the .css .html files? Which can be cached but then need to be downloaded again? If the latter, how do we deal with this problem? I

Browser Awareness of Bluetooth Beacons / iBeacons

故事扮演 提交于 2020-01-12 03:33:11
问题 Is there a way to make a browser aware of iBeacon devices in its proximity? Similar to the way HTML5 Geolocation is working... If not would this be something that can be achieved with a browser plug-in that can provide the detail to be consumed by javascript? 回答1: Unfortunately, no. No web browsers have implemented any bridges between beacon detection and JavaScript. I don't think a plugin approach is possible on mobile browsers (either iOS or Android), because neither browser supports

Browser Awareness of Bluetooth Beacons / iBeacons

一世执手 提交于 2020-01-12 03:31:37
问题 Is there a way to make a browser aware of iBeacon devices in its proximity? Similar to the way HTML5 Geolocation is working... If not would this be something that can be achieved with a browser plug-in that can provide the detail to be consumed by javascript? 回答1: Unfortunately, no. No web browsers have implemented any bridges between beacon detection and JavaScript. I don't think a plugin approach is possible on mobile browsers (either iOS or Android), because neither browser supports

How to clear history of text input

本秂侑毒 提交于 2020-01-12 03:22:45
问题 In my html page I have multiple text inputs. Every time I enter values in them it shows me previously entered values. Is it due to browser property or html? how do I disable it? 回答1: Always the better appraoch is to give form autocomplete="off" <form autocomplete="off"> <input type="text" id="text1"> <input type="text" id="text2"> </form> Then only newer versions of Eclipse support HTML5 tags such as autocomplete else it will show warning... 回答2: Just set the autocomplete property of your

change to this file were not saved to file system error in google chrome version 30.0.1599.101 m

牧云@^-^@ 提交于 2020-01-11 18:46:06
问题 Image Notification In the google chrome version 30.0.1599.101 m i am not able to save the changed js file. On saving the js file i got yellow triangle symbol with "change to this file were not saved to file system" message. I know this used to work in older version I am using windows-7 64 bit 回答1: Click on the cog in the developer tools window (lower right corner) Go to workspace and add the directory which you would be working on. This is to accidentally prevent you from modifying files that

CSS3 - What are the performance best practices? [closed]

ぃ、小莉子 提交于 2020-01-11 17:15:10
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 8 years ago . Last year I spent a long time reading up on javascript performance, bottlenecks and best practices. On my latest project I'm using

Continue executing after browser()

时光毁灭记忆、已成空白 提交于 2020-01-11 10:32:10
问题 I'm debugging R code with browser(). The function pauses the execution of the current R script and allows for inspection. Is it possible to enable/disable the debug mode on the fly, during the execution? With large scripts it would be very handy. Thanks 回答1: Your question prompted me to read ?browser . The documentation says you can use the expr= argument to browser to create (the illusion) of conditional debugging. That, combined with a global option should give you what you want. foo <-

Poor performance of html5 canvas under firefox

随声附和 提交于 2020-01-11 10:13:24
问题 I have the following html5 code: <canvas id="myCanvas" width=600 height=600> </canvas> followed by some javascript: <script type="text/javascript"> <!-- var img = new Image(); img.addEventListener('load', function() { reDraw('', this); }, false); img.src = "wood.png"; function reDraw(canv, image) { var canvas = canv; if (canvas == '') { canvas = $("canvas"); } var size = canvas.attr("width"); var elem = canvas.get(0); if (!elem || !elem.getContext){ return; } var context = elem.getContext('2d

different behavior of keyword “this” between node.js and browsers

我的未来我决定 提交于 2020-01-11 08:56:15
问题 I've tried following code in ie, firefox and node.js var x = 10; var o = { x: 15 }; function f(){ console.log(this.x); } f(); f.call(o); the results in browsers are 10, 15, but the result in node.js is undefined, 15. Please explain to me what is the different behavior of “this” keyword in browsers and node.js? I've read many pages but there wasn't any obvious answer. Thanks in advance. 回答1: Javascript files loaded in Nodejs are automatically wrapped in anonymous functions. So in Node what you

Can I programmatically access a smartphone's sensors through the browser and JavaScript?

我们两清 提交于 2020-01-11 08:53:08
问题 Is it possible for me to programmatically access a smartphone's sensors (e.g. accelerometer, compass, etc. on an Android or iPhone device) through a browser webpage and JavaScript? I know that the W3C Devices standard can allow access to the camera. 回答1: HTML5 is likely to contain a sensor API. Until this is fully standardized, vendors provide their own APIs such as Apple does for mobile Safari. There's no need for full blown solutions like PhoneGap or similar if it is Ok for you to restrict