Is there any way to know if a download is happening - google-chrome

Is there any way to know if a download through a browser is happening? (I am thinking of creating an app,though whole concept relies whether this particular feature is possible or not)
For example: Say I start downloading a file from a web browser, and a program is running in the background( preferably written in Java) which can detect that a download is happening and it can get access to the link.
Ideally it should be able to detect from any browser, but even if it works with one browser it is fine for me at the moment! Any ideas if this is even possible?

I want to do the same thing. My first thoughts are :
1. Low level browser independent :
Sniff traffic and filter captured packets (Protocols HTTP/FTP + other filter rules). You may use WinPcap or even try the LSP approach.
2. High level browser dependent : Create browser plug-ins (BHO for Microsoft Internet Explorer, Extension for Google Chrome, Add-ons for Mozilla Firefox)

Related

Can programs be written that can quit from Chrome browser?

If I visit a site, I want to close the Chrome Web Browser. Is it possible to write such a program?
Under normal operation, this should not be possible. However, there have been cases where browsers have had well known bugs that could be exploited. To be clear though, I'm referring to crashing the browser. There is no supported API or method of asking the browser to close.
For instance, a simple line of CSS could crash Internet Explorer 6. Something like this on Chrome would probably not work anyways, since Chrome runs each tab in its own process.
There is a way to close a browser window (tab) via script if your script opened the window, simply by calling window.close() (where window is the child window). Please see https://developer.mozilla.org/en-US/docs/Web/API/Window/close for more information.

more insights on how PWA works

might be very basic question but just wanted to clear out my doubt, since I'm seeing PWA is like alternative for native application.
What if browser fail to read/understand manifest file?
what if user is having other/older browser? (most of the time I see e.g of chrome)
after installation what are the browser dependencies for PWA?
Please guide me with the above.
Thanks
One of the more important concepts in a PWA is that it is built following the principle of progressive enhancement, this means that the website would function ordinarily on older browsers (including Safari) and then gain PWA abilities if the user's browser supports them.
Therefore in answer to your three questions:
Website would function as normal without the option to "Add to HomeScreen"
Same.
The PWA runs using the browser, therefore any functionality supported by the browser will be included in your PWA.

Can we do web push notifications in chrome without using GCM/FCM?

I am trying to do web push notifications in Chrome without using GCM/FCM. Is it possible? I'm not able to find examples on how to use a different push service.
No, it is not possible to use another push service.
In Firefox, you can do it by modifying the dom.push.serverURL preference, but obviously you'd need privileged access to alter the value of the pref.
There are third-party services that you can use to implement push notifications, but they will use the Web Push API under the hood (so Autopush on Firefox, GCM/FCM on Chrome).
Yes. Using VAPID spec and service worker you can use web push notifications without FCM/GCM. For more information please look into below google docs.
https://developers.google.com/web/fundamentals/engage-and-retain/push-notifications/how-push-works
I have used Using VAPID for WebPush. This works in Firefox and IE Edge browser. But not mail in Chrome browser.
Again in Firefox action seems to be not working. Whereas in IE Edge, notification actions buttons will work
It can be done using Service Workers. It's new w3c feature.
I've not tried it yet, but you can have a look at it:
https://developers.google.com/web/fundamentals/getting-started/codelabs/push-notifications/
It's not compatible with all browsers. Ref.: http://caniuse.com/#feat=serviceworkers
good grief the advice here is DISGUSTINGLY bad
yes you can do it using https websockets and also a Microsoft project called SignalR which doesn't even "need" browser support, i.e it will work in javascript no matter what
the reason I mention SignalR is that is DEGRADES the mechanic to the bet fit to ensure it works whatever the weather.. tools they use are
from old sckoole long polling
all the way up to WebSockets under the covers when it's available
(and gracefully fall back to other techniques and technologies when it isn't, while the application code remains the same)

Chrome 32 - Tab opened with chrome extension doesn't render plug-in correctly

We have a Chrome extension that can be used to open a page into our website. From there the user then continues onto the next page which has a custom NPAPI plug-in embedded in it. This has always worked fine. However, since the version 32 update the plug-in loads and runs (it's a video conferencing plug-in and is clearly running as the other side can see video) however it doesn't show up on the page. Examining the DOM everything looks fine. Grabbing the border and re-sizing the browser will cause the plug-in to suddenly render correctly. I've tried all manner of javascript/css tricks to try and mimic this behavior as a workaround but nothing works. Tabs opened manually (not using chrome.tabs.create) work fine.
This worked up till 32.
Any ideas around this?
Chrome 32 is phasing out NPAPI, read the announcement here.
There is a deprecation guide that you can read here.
It seems like Google wants you to use it's Native Client tech to run native compiled code on user's machines. It is cool stuff...but so far I've found it difficult/more limiting to work with when compared to NPAPI (but there are obvious upsides, security for instance).
You could also build a native app and use native message passing to communicate from extension -> app. Once downside to this is that there is currently no way to bundle a native app into an extension install, so the user will need to download and install your app separately.

Force Chrome to open certain URLs based on Content-Type header

I tried looking for a Chrome extension that does this, but was unsuccessful in finding one. Basically, I want to hit a web service that returns a content type header of application/rdf+xml or application/xml and have Chrome automatically display the content inline. I have the XML Tree extension which displays the XML just fine, but Chrome by default will download files unless they have a certain extension.
My question is: Is there a way to force Chrome to open certain things inline based on Content-Type returned from the server? Extension or direct support in Chrome is fine with me. If one doesn't exist, I'll investigate developing one.
Great question, one I've been trying to answer for ages. Unlike firefox, chrome, and chromium, use an external xdg mime-type query to decide what helper applications to use, but one generally doesn't want to set chrome as a generic handler for application/rdf+xml. So I was very pleased to discover the chrome extension "application/...+json|+xml as inline." Available from the web store, or at
https://github.com/andreineculau/chrome-inline-media-type
Thanks andreineculau!