Provide link to open in different browser - html

I have a webapp which is running perfectly well in most browsers, but I'm still trying to work out a few bugs which is preventing it from working correctly in iOS Facebook's in-app browser. Until I've got these sorted, I'd like to provide a message to give users the option to open the link in Safari.
The solution I have for now is to use javascript to detect the browser's user agent (similar to this question), and if it's the Facebook in-app browser, provide a message that the webapp is optimised for Safari and give instructions to copy and paste the link into Safari.
My question is this: is there a way to make a <a> tag open in a particular browser? I have seen questions like this one which seem to point to using target="_system" for Cordova apps, but is there a method to do this with html only?

There isn't a way to do this for Safari (using just HTML, anyway). For other browsers that have custom URL schemes, you could do it. For example, for Chrome you could have your link point to googlechrome://www.website.com.

The definitive answer: No, this is not possible.
As Andrew M mentioned, some browsers have some methods that do some things similar, but a pure html method to open a link in a generic browser does not exist.

Related

Replace redirect from Microsft Edge to Google Chrome in HTML

in this piece of HTML code
PARTECIPA
the opening of the website in the Microsoft Edge browser is indicated if installed on the device.
Can anyone help me? I would like the site to open in Google Chrome and not in Edge.
How should I edit this HTML?
To open the link using the Chrome browser instead of Microsoft Edge, you can change the value of href attribute like this: PARTECIPA. Assuming that Chrome browser is installed, that should open the Chrome browser.
Problem:
If Edge is not installed on the device (mob, desk or tab) it doesn't
work
In this case, it's best to simply use a standard URL without specifying a specific browser, like this. PARTECIPA. In addition, the "googlechrome:" protocol is not a standardized protocol and probably may not work in all devices. So, you can use a standardized URL like the code snippet I posted above and let the users device choose.
Do you know if instead of chrome I can specify "default browser"
Example PARTECIPA or
something similar?
There is no standard protocol for specifying the default browser. So, best approach is to simply use a standard URL without specifying a specific browser. But if you really want to use special web protocols inside hypertext links to force web pages or files to open with particular browsers on Windows or iOS, place browser-name before the hypertext reference link.
Check this:
Open in Google Chrome
Open in Microsoft Edge
Open in Mozilla Firefox
Open in Apple Safari
Open in Opera
This function does not work!
A similar example is for IOS, which works in the following way
Example :
PARTECIPA
Google has official documentation on the Chrome iOS app’s URI scheme on its developer website.
Simply replace http with googlechrome and https with googlechromes. This means:
http://www.google.com/ becomes googlechrome://www.google.com/
https://apple.stackexchange.com/ becomes googlechromes://apple.stackexchange.com/
Previously, it supported an x-callback-url of googlechrome-x-callback://. This allowed the calling app to indicate its name and URI scheme to Chrome, which would show a back button in the address bar that closes the tab and invokes the specified URI. This feature was removed a few years ago when iOS 9 added the “Back to …” button in the status bar (but the URI scheme still works).

index.html file is not reading main.css file for only chrome (desktop)

My website is hosted by 000webhostapp.com. It is working in all browsers (Moz, Opera and mobile) except desktop chrome. There is no error in W3C validator and all path and links are correctly written. What maybe a reason?
in Chrome desktop
DT(F12) console screen
The culprit here is AdBlock. More precisely, EasyList filter list that is applied to AdBlock's filter sets by default.
There's a following rule inside that set which says: Block any resource where URL matches to /adx, but not for domains adx.uk.com or adx.wowfi.com.
/adx.$domain=~adx.uk.com|~adx.wowfi.com
In your case it matches a part of your domain name: http://adx.000webhostapp.com/css/normalize.css
You can find every blocked resource on AdBlock tab in your browser's Developer Tools.
How to solve this?
The best way to solve this is to contact EasyList authors and inform them about incorrectly blocked content. According to their website, the preferred way is to write on their forum (registration is not required).
Another way is to serve every resource (styles, scripts, images) from different domain that will not get caught up in the filter.
Yet another way, tho not recommended, is to ignore this issue or entirely change your domain name.
I looked into it and it seems the problem is adblock, I tried disabling my adblock on chrome and it worked just fine so maybe look into why adblock is stopping you from loading your css or just put in something that tells the user to disable the adblock.
More information here: https://www.keycdn.com/support/how-to-solve-err-blocked-by-client/

In Chrome what is screen_capture_injected?

when i view the elements using chromes developers tools, in the BODY tag i see
screen_capture_injected=true
What does this mean? What does it do? I tried searching for it, but couldnt find anything.
In my case, I have installed the "Screen Capture" extension which I believe is the one adding this attribute.
It is a browser extension injection. I can be from any browser plug-in or extension. It allows newer browsers like chrome to do all the neat things to the web pages that we love (i.e., screen capture, Google voice links, greasemonkey editing, etc.)
Hope that clears it up.

How to promote to install Chrome Extensions from your own website?

When I visit some websites, on top of the browser it promotes me to install Chrome Extension by saying "This website now has Google Chrome Extension... Install".
Anyone knows how to do this? Does Google already provide scripts to do this?
Example: Visit the following site using Chrome:
http://www.independent.co.uk
Now, it's possible to do what you need. Just follow this link, that explains how to use "inline" installation once you've published your app or extension at Chrome Webstore.
PS. Inline installation only works in Chrome 15+
Paul Kinlan's Badgemator is a good resource for this sort of thing. It creates a JavaScript snippet that you can put on your site in order to direct users to the webstore entry.
It doesn't attempt to mimic Chrome's infobar in the same way that The Independent does, but I personally think that's a good thing. Pretending to be part of the browser is a good way to confuse users, and isn't something I'd recommend (especially now that the infobar extends outside the browser window into Chrome's own UI).
What you're seeing is not built into Chrome, and not provided by Google.
The site will have some code that detects your browser agent (either via Javascript or a server-side script), sees that it's Chrome, and then adds some extra HTML/CSS/Javascript to make a mock UI element to grab your attention. Inspect the element to see what's really happening.
Another example is http://page2rss.com/page?url=www.stackoverflow.com/
Also, see Alerting website visitors that a chrome extension is available - how?
I wrote a jQuery extension that does just that: http://blog.dreasgrech.com/2012/01/promoting-your-chrome-extension-with.html
The simplest way to use it is to simply pass the ID of your Chrome extension:
$.fn.extInfobar({
id: 'nbilgjjflfiiijecdjpnbganoiafneph'
});
That generates the following:
From Chrome 15 there is API for this.
Just ask Chrome if your extension is installed.
You need to publish your extension in Google Chrome Extensions site, then you'll be able to publish it in your site.
You'll need to pay a one-time fee ($5) in order to get registered as a developer.
As of 06/12/2018, inline installation is deprecated. For more information, read our Chromium Blog post and Migration FAQ.
From: https://developer.chrome.com/webstore/inline_installation

is there anyway to force a link to open up in IE, even if not the default browser

we have a website with links to a sharepoint. These features in sharepoint only work in IE so i dont want to open up firefox or chrome if that is the default browser. Is there anyway to have a
My Link
force open up in internet explorer ?
You can use javascript to inject the link in your HTML code if the client is IE, and maybe show a warning message if the browser isn't IE. Anyway you can't tell any browser to open a link using another browser.
No, definitely not.
For Firefox users, the best thing that comes to mind is to have them install the IE tab. It allows the opening of pages inside Firefox but using the IE engine - but also requires user action.
If this is run in a windows environment, you could use a PHP script to open Internet Explorer through PHPs support for COM objects.
If you are interested I can provide the script to do this.