browser

Why does FireFox 3.6.8 not cache static contents from asp.net developer server?

早过忘川 提交于 2019-12-19 03:14:06
问题 I am working on a asp.net web site, like normal user, we use asp.net developer server during coding and testing. Today, I found the firefox not cache any static file of my site, since our application is pretty big, it made page load time very slow. I checked firefox about:cache, all the static file cache setting looks like Key: http://localhost:26851/App_Layout/icons/actions/email/folder.png Data size: 871 bytes Fetch count: 1 Last modified: 2010-08-19 11:59:46 Expires: 1969-12-31 16:00:00

what's the difference between Browsers and Node?

时间秒杀一切 提交于 2019-12-19 03:10:52
问题 what's the difference between Browsers and Node? for instance: setName.js on Node: var setName; setName = function (name) { return this.name = name; }; setName("LuLu"); //LuLu console.log(name); //undefined console.log(this.name); setName.html in browser: <script> var setName; setName = function (name) { return this.name = name; }; setName("LuLu"); //LuLu console.log(name); //LuLu console.log(this.name); </script> the the second log is different,why? 回答1: Node is a JavaScript engine, not a

Angularjs $window.open popups being blocked

大城市里の小女人 提交于 2019-12-19 02:54:11
问题 I am trying to use the Github API's web auth flow from within an AngularJS app. When my signup form submits, I want to open a new window to send them to the the auth page. Normally I would just use window.open inside a user event to ensure it wouldn't get caught by a popup blocker. In my angular app, I am wrapping a bit of the Github api in and Angular service, and the code to open the window goes in there. Because of that it gets blocked. I also tried putting it in a function in the

Are inline JavaScript regular expressions faster?

冷暖自知 提交于 2019-12-19 02:52:27
问题 Is it better to use the RegExp object or the inline style? And why? 回答1: According to the ES3 specification, they are slightly different in that the literal syntax ( /regex/ ) will create a single RegExp object upon the initial scan: A regular expression literal is an input element that is converted to a RegExp object (section 15.10) when it is scanned. The object is created before evaluation of the containing program or function begins. Evaluation of the literal produces a reference to that

Server side browser that can execute JavaScript

女生的网名这么多〃 提交于 2019-12-19 02:04:19
问题 Is there any programming libraries available that will parse an HTML document, execute JavaScript and then allow me to navigate the DOM? This needs to be performed server side, not client side. Any language will do, but Java, PHP, or Ruby are preferred. 回答1: in java: http://lobobrowser.org/cobra/java-html-parser.jsp this is a a Javascript-aware, CSS-aware HTML parser the most important feature in relation to your question: It is Javascript-aware. DOM modifications that occur during parsing

Server side browser that can execute JavaScript

别说谁变了你拦得住时间么 提交于 2019-12-19 02:04:09
问题 Is there any programming libraries available that will parse an HTML document, execute JavaScript and then allow me to navigate the DOM? This needs to be performed server side, not client side. Any language will do, but Java, PHP, or Ruby are preferred. 回答1: in java: http://lobobrowser.org/cobra/java-html-parser.jsp this is a a Javascript-aware, CSS-aware HTML parser the most important feature in relation to your question: It is Javascript-aware. DOM modifications that occur during parsing

C++ OS X open default browser

笑着哭i 提交于 2019-12-18 22:23:12
问题 I would like to know a way to open the default browser on OS X from a C++ application and then open a requested URL. EDIT: I solved it like this: system("open http://www.apple.com"); 回答1: In case you prefer using the native OS X APIs instead of system("open ...") You can use this code: #include <string> #include <CoreFoundation/CFBundle.h> #include <ApplicationServices/ApplicationServices.h> using namespace std; void openURL(const string &url_str) { CFURLRef url = CFURLCreateWithBytes ( NULL,

How to measure memory usage and efficiency?

久未见 提交于 2019-12-18 19:05:48
问题 I have a web app that uses a lot of JavaScript and is intended to run non-stop (for days/weeks/months) without a page reload. However, Chrome is crashing after a few hours. Safari doesn't crash as often, but it does slow down considerably. How can I check whether or not the issues are with my code, or with the browser itself? And what can I do to resolve these issues? 回答1: Using Chrome Developer Profile Tools you can get a snapshot of what's using your CPU and get a memory snapshot. Take 2

How to measure memory usage and efficiency?

不羁岁月 提交于 2019-12-18 19:05:07
问题 I have a web app that uses a lot of JavaScript and is intended to run non-stop (for days/weeks/months) without a page reload. However, Chrome is crashing after a few hours. Safari doesn't crash as often, but it does slow down considerably. How can I check whether or not the issues are with my code, or with the browser itself? And what can I do to resolve these issues? 回答1: Using Chrome Developer Profile Tools you can get a snapshot of what's using your CPU and get a memory snapshot. Take 2

Can you add new CSS properties in Chrome Inspector?

老子叫甜甜 提交于 2019-12-18 19:02:37
问题 Is it possible to add new CSS properties in the Chrome inspector? It seems that you can only edit existing properties. Also, once you edit the properties, is there a way to view the revised CSS as a whole? 回答1: Yes, it's possible to add new CSS properties in the Chrome inspector and review them in a few easy steps: Right click in the element you want to change and choose "Inspect element"; Click the "New Style Rule" button ( 1 in the image below ); Google Chrome will assign a CSS matching