Specify web brower in href tag - browser

Is there a way to specify the web browser to be used in a href tag ? For instance, I have the following URL and I need it to be opened with Firefox only :
LPO Vienne
Thanks for your advices !

Actually it is possible these days - at least in the case of Microsoft Edge. Check this out. Although agree with ProWebMonkey that usability issues still apply.

This is not possible. If it was it would have to work on the assumption the user would have that browser, so even if it was possible it would not be a very good solution.
You could always have a notification on the linked page, explaining the user should use a specific browser, if they are not already. This would be more user friendly and you could provide a link to download etc.

Not true at all. It is possible like this:
A HREF="microsoft-edge:http://www.yoururlgoeshere.com"
the call "microsoft-edge:" before the actual URL will force the link to open in that browser, assuming the browser is installed on the machine.

Related

How to make your browser pretend it's a mobile phone?

I would really like to check out the source code of some website. They have a mobile detection script of some sort I guess, when you visit said website it redirects you to a mobile version (nope, entering the URL that they redirect me to in my browser doesn't work).
How can I pretend my computer is an iPhone or HTC or whatever?
Install this add-on for firefox which will let you change the user-agent string.
https://addons.mozilla.org/en-US/firefox/addon/user-agent-switcher/
You may also like to try and OPEN the page in TEXT pad
Here is a simple version I did up for a client
http://www.baccus.net.au/m/index.php
NOTE that it strips the PHP and just leaves the HTML component
You can then SAVE AS html page and see what the page looks like.
You may need to do a BASE HREF to keep the full path and there are often problems with many CMS systems, but this will get you over the line quickly.
Hope this helps
if you are using PHP try this $_SERVER['HTTP_USER_AGENT']
you get phone company + model + browser info or os info !
The link in the accepted answer no longer exists. The recommended alternative currently:
https://addons.mozilla.org/en-GB/firefox/addon/user-agent-string-switcher/

open webpage in firefox

i am not sure..is there any chance to open my webpage in firefox. for example i am browsing mywebsite using IE. when ever i click link of the page then automatically it will open in firefox. this option is not for all pages only for specified page.
thanks.
If this were the case, ie6 would have gone out long ago. The best you can do here, would be to check which browser they are using (get_browser if you are using php) and refuse to show content to people using browsers other than firefox.
Instead you could redirect them to a page explaining why they need to be using firefox to access your websites services (I guess a link to the firefox download page would be nice too)
Sorry, it's not possible from plain HTML to open a webpage in a different browser. You can, at most, open the page in a new window of the same browser.
However, what you ask is not completely impossible. You could write a browser plugin that handles links and runs the Firefox executable
I would seriously hope this isn't possible.
What you ask for is not possible , but you could display a warning to your users that the page works best in the desired browser.

How can I programmatically control a browser such as chrome in linux and execute javascript per each tab?

I have been given a task of toggling nearly 200 users' permissions in an admin. I have access to the database, and I'm sure I can do this in SQL but I'm curious to find out how to do it this way as well, plus I suspect it will be less work because I don't have to study the SQL that's going on and I know exactly what to do after I get access to the browser instance and know how to execute javascript programmatically in the context of the web page open.
I basically want to provide a list of urls which will open ( 195 ) and then execute javascript to toggle checkboxes, then submit the form.
As I stated, I want to use firefox or chrome and I'm on linux.
This is basically what greasemonkey does.
Or, if you can do it all while staying on the same page, you can also just type in arbitrary JS code by hand in the firebug console or its Chrome equivalent. This could work if combined with some iframe trickery.
If you use Chrome, it has built in support for user automation scripts: http://userscripts.wikidot.com/, http://www.chromium.org/developers/design-documents/user-scripts
I think a cleaner solution would be for you to figure out what is the url and the parameters to pass to do what you need. Then you can just use curl to make those requests.
I use CJS Chrome extension. I add a short script take loads a script from my localhost server and executes it. The executed script can also send results back to the server.

How to detect if user is using Mac or Windows on website

What's the standard, most reliable way of doing this? I need to redirect a user to download the Mac version or the Windows version of my software when they click "Download" on my website.
In Javascript:
http://www.quirksmode.org/js/detect.html
No method is perfect, because the user can always spoof the user-agent.
I would recommend that:
1) Auto-redirect to a page with the link, or auto update the link on a page with text saying "Download for Mac" or "Download for Windows", so that the user knows what they are getting before they click.
2) Still give the user the option of downloading the other version, in case your detection does not work in their case, or if they want to download on a remote machine, and transfer it to a different machine later.
It is easily spoofed, but you can take a pretty good guess by examing the user agent string. You can do this in JavaScript or your server side language.
Because you may detect it incorrectly, you should place somewhere a "Want the Mac OS X version" etc somewhere.
You want to look at the user agent found within the http header.
User Agent
Not 100% reliable, but you can infer much from a user-agent string in the HTTP header.
You need to use navigator.platform or parse navigator.userAgent. Example.

How do you globally modify page output sent from IIS without modifying the page source?

A couple sites of mine recently got "hacked". Someone was able to add a line of JavaScript to the bottom of every page on the site.
The server is a Windows Server 2003, and has Cold Fusion 8 and MySQL 5.x installed and running.
Looking into the code on each page shows that none of the pages were modified. The JavaScript is not in the code files themselves. This leads me to believe it is an IIS problem, but I am unsure and cannot find anything that would be able to do this within IIS.
The JavaScript being added redirects a user to another page only when they come from Google, or at least it appears to work this way.
Any help on how someone was able to accomplish this as well as removing it would be greatly appreciated.
Another way to word the question thanks to #Jeffrey Hantin
How do you systematically modify output from IIS without modifying individual pages?
EDIT: A bit more testing has shown that only the .cfm pages add the extra javascript. Added a new .cfm and the js was there but a .html did not have it.
Edit2: Turns out to have been a coldfusion problem after all. Somehow the pages OnRequestEnd.cfm were created on the sites and added that js.
Looks like someone exploited some latest Adobe CF vulnerabilities.
Please see these blog posts for details and try to search symptoms on your server:
Image upload
FCKEditor bug + this post
Hope this helps.
Turns out to have been a coldfusion problem after all. The page OnRequestEnd.cfm were created on the sites and added that js.
If you only want to use IIS to modify output, the ISAPI filter is probably the best answer. If you would like to use Coldfusion, you could utilize the application.cfc to modify output during certain parts of the request cycle or wrap all of your pages in a Custom Tag to consolidate the like portions of your page templates.
I have used both. In cases where my page headers and footers are all the same, the custom tag is fast and easy to use. To make changes to all the pages, you edit one custom tag file. In cases where I have a more complicated web application I'll use the application.cfc to store and insert common components where they are needed.
They might have guessed your password. You should change it immediately.
It's possible that an ISAPI filter is used to do this. I once used one myself to perform compression before IIS supported it natively.
In your specific situation, you may want to check for ISAPI filters you don't want installed. Of course, if your server has been compromised, you will likely be better off rebuilding from a known good image rather than trying to fix it in situ.

Resources