browser

Programmatically pass additional header info along with URL to open a browser

守給你的承諾、 提交于 2020-01-06 02:49:12
问题 I have an application which at one point wants to launch a particular URL in the default browser. This is pretty simple and can be achieved using ShellExecute on Windows. However the catch is that the server expects some additional custom header information (for authentication/identification purposes) to be sent along with the GET request. Is there any way by which this (additional header) information could be passed to the browser while launching it? Note:- I want to launch the default

Can an inserted <script> tag be run multiple times without using eval in JavaScript?

左心房为你撑大大i 提交于 2020-01-06 02:32:10
问题 I have to use a plugin which bundles js files inside html files (gadgets). For one use case I need to drop and re-instantiate a gadget to run updated code. So say I have foo.html : <html> <head> <script src="foo.js"></script> </head> <body>...</body> </html> and foo.js which is the file being injected into my actual document's head: alert("hello"); Problem is I can only cachebust the html file dynamically and declare my gadget as foo.html?x=123 , but the JS file I'm after will still be foo.js

Write to a file without external JS libraries (pure Javascript) in a browser ?

ε祈祈猫儿з 提交于 2020-01-06 02:05:29
问题 Is it possible to write a string to a file (create the file if it doesn't exist) without any external Javascript libraries , purely with Javascript code ? I'm trying to implement a client side code that whenever it reaches a page (.ASPX) it writes few strings into a file (let's say output.txt ) and that's it . From everything I see over the internet , JavaScript is not allowed to write anything to the hard drive . Is that so ? no workarounds ? 回答1: As said in the comments, what you sound to

Write to a file without external JS libraries (pure Javascript) in a browser ?

房东的猫 提交于 2020-01-06 02:05:05
问题 Is it possible to write a string to a file (create the file if it doesn't exist) without any external Javascript libraries , purely with Javascript code ? I'm trying to implement a client side code that whenever it reaches a page (.ASPX) it writes few strings into a file (let's say output.txt ) and that's it . From everything I see over the internet , JavaScript is not allowed to write anything to the hard drive . Is that so ? no workarounds ? 回答1: As said in the comments, what you sound to

Create big downloable file from string variable in HTML/Javascript

久未见 提交于 2020-01-06 01:16:36
问题 I created a js script where I can download a file from a string variable: window.alert("a"); document.getElementById("export-graphml").innerHTML += "<a id=\"dl\" download=\"graph.graphml\">Download</a>" window.alert("b"); var vdl = document.getElementById("dl"); window.alert(data.length); vdl.href = "data:text/plain," + encodeURIComponent(data); It works very good until my string var (data) isn't too big. When my data is too big the last line of the code makes Chrome and Firefox crash and IE

Browser plugin which can register its own protocol

被刻印的时光 ゝ 提交于 2020-01-05 17:37:23
问题 I need to implement a browser plugin which can register its own protocol (like someprotocol://someurl) and be able to handle calls to this protocol (like user clicking on 'someprotocol' link calls function inside my plugin). As far as I understand, Skype does something similar, except I need to handle links within page context and not in a separate app. Any advice on how this can be done? Can this be done without installing my own plugin, with the help of flash/java? 回答1: Things are going to

Browser plugin which can register its own protocol

别等时光非礼了梦想. 提交于 2020-01-05 17:37:10
问题 I need to implement a browser plugin which can register its own protocol (like someprotocol://someurl) and be able to handle calls to this protocol (like user clicking on 'someprotocol' link calls function inside my plugin). As far as I understand, Skype does something similar, except I need to handle links within page context and not in a separate app. Any advice on how this can be done? Can this be done without installing my own plugin, with the help of flash/java? 回答1: Things are going to

How to detect .NET framework installed in a web page (pure HTML or PHP)

眉间皱痕 提交于 2020-01-05 12:56:33
问题 I need to display additional information on a web page (PHP) if one of the following criteria is met: .NET Framework Installed on the client machine in lower than 3.5 Impossible to determine if .NET Framework 3.5 is installed or not on the client machine I know that some browser (if not only one, IE) is sending that information in his tag. Can any of you provide me with his suggestions ? Website is built in PHP. Thanks! EDIT: Proposed answers are incomplete and/or don't provide me with a

How to clear form data so refresh doesn't duplicate data without forwarding?

可紊 提交于 2020-01-05 12:13:32
问题 I created a guestbook, in which users can add entries via an HTML form. After submitting data to the guestbook, some users refresh the page. All browsers I know resubmit the data. afterwards. Is there a way to tell the browser, that the data should not be resubmitted? I used to have a redirect after sucessfully storig the data to the database. But, now I want to promt some additional information to the user, e.g. "Thanks for your entry entitled '...'.", or "A coy of the entry was sent to your

How to find out which favicon a browser actually uses

北战南征 提交于 2020-01-05 08:58:01
问题 I have a new website with a set of favicon images auto generated from a source file using Real Favicon Generator, and there are: 9 Apple favicons 1 Android favicon 3 named favicons 1 Safari pinned SVG 1 json manifest 1 set of Microsoft tile image/colour Obviously most of these can be placed for their respective vendors - Apple, Microsoft tiles, etc. I have an issue in that running the website on Firefox, I want the favicon it uses to change but I do not know which one it actually uses? I have