Default browser detection - google-chrome

whenever you open a browser if it's not set as default one, it will ask us to set it as default.How it is sensing this. I tried google search for the answer but did not get clear information. So how does browsers detects if it is a default one when they start?( I use Chrome and Firefox, they do this, ask us to set them as default, not sure about other browsers).

Related

Open Chrome without it taking focus (Puppeteer)

I'm using Puppeteer to launch multiple browsers - Every few minutes, it'll reopen the browsers. This works fine, except it's constantly opening browsers and focusing the tabs, bothering me while I'm trying to use the computer. Due to what I'm trying to do, I have a few specific problems that ruin any ideas I can come up with, like
Don't close the browser, clear the cache! (I'm using a plugin that doesn't allow you to clear cache like this, it forces you to close + restart the browser)
Use headless: true! (Again, due to my use case, the plugin sadly doesn't work with headless: true)
Tl;dr, I need a way to open a browser (that can be used in a Puppeteer) that won't take focus, without just setting headless:true
If you have any advice or ideas, that'd be awesome!
Edit: My OS is Windows

Strange issue with unwanted small-caps in Firefox

Ok off the bat I appreciate this is a weird one but just throwing it out there as I'm out of clues.
Almost got sign off from a client when they brought it to my attention the navigation on the site was messing up when resizing in the browser.
It only occurred to me after they sent me a screen shot what was happening, take a look:
My browser (Firefox v29)
His browser (Firefox v29)
For some reason he is seeing something rendering with font-varient:small-caps; which is not even set in my css. I've even tried setting font-varient: normal; just in case.
Has anyone else come across this? It's really bugging me out because I can't possibly recreate the problem in order to fix it.
Thanks
Ask your client to clear the browser's cache and history and reload the page with Ctrl + R key combination.
It seems to be an CSS style cache problem, the rule for the font in his case is
text-transform:capitalize and in your case is font-variant:normal.
Also make sure that your client do not use custom CSS style in Firefox, which overrides the page's one. Some browser plug-ins allow such custom CSS style overwrite, for better accessibility.
Maybe it's related to default browser settings - he might change it manually in Firefox settings or maybe some accessibillity software did it.

What causes the IE browser to detect compatibility view

I've noticed some websites IE will automatically trigger to display in compatibility view, but once you disable it, it won't auto-trigger anymore. How do you make the browser reset this behavior so it will go back to how it was before it was disabled, to see if it auto triggers it or not?
I've tried clearing it out in websites to view in compatibility view and it still doesn't reset its behavior of auto-triggering compatibility view.
It often happens when a doctype either isn't set, or is set incorrectly. Plus, even if a doctype is set correctly, if PHP or manual code entry leads to anything being output before the doctype, it can also cause this issue.
If you press F12 you should get the Developer tools. There is a drop-down menu at the top titled "Browser Mode" - in there you should find compatibility view. Also, restarting IE can sometimes work for me.

Is there any evidence that other browsers will support Google Chromes drag download to desktop?

Does anyone know when or if other browsers like Firefox and IE will allow users to download files from their browser using drag and drop like Google Chrome?
This feature is super cool and I wish I could use it in all browsers!
Thanks, Ian
UPDATE:
Here is an example:
ondragstart="event.dataTransfer.setData('DownloadURL', 'application/force-download:[FILENAME]:[PATH TO FILE]);"
As far as I can tell this is a Chrome feature, and not part of the Drag and Drop specification. My research also suggests that Google only even added it so they can use it with there products (Gmail, and probably the new google drive).
As this is not a part of the Drag and drop specification, and neither Mozilla nor Microsoft have announced anything about it, I believe the answer is no. However if it becomes a popular feature others may follow suit.
It may also be possible to emulate the effect with more complicated code (drag and drop is there, this specific feature is not) or perhaps with a browser add-on.

Is autocomplete="off" compatible with all modern browsers?

I've just been given a requirement to prevent browsers from saving data entered into specific form fields. It's been years since I've done web dev, and this is a relatively new capability. I was able to find the form field property autocomplete="off", but I can't seem to find any documentation indicating which browsers support it. Can anyone point me in the right direction of a chart of form attributes and browser compatibility?
Be aware that all major browsers are moving towards ignoring the attribute for password fields.
I can only offer anecdotal evidence, but I've yet to come across a browser that fails to respect autocomplete="off", this experience covers:
Firefox 1.5+ (Windows and Ubuntu)
Opera 6+ (Windows and Ubuntu)
Chrome v2+ (Windows and Ubuntu)
Epiphany 0.8 (ish) (Ubuntu)
Midori (I can't remember which version)
Safari v1+ (Windows)
IE 4 - 8, Windows.
I'm aware that Greasemonkey scripts, and presumably other user-scripts, can disable the autocomplete setting.
There's a couple of articles I found that might be useful to you:
How to turn off form auto-completion
Using auto-complete in html forms
Password managers now ignore the autocomplete attribute for password fields in the major browsers as of:
IE11
Firefox 30
Chrome 34
Safari seems to have an opt-in option to ignore them
It should still work fine for disabling autocomplete on form fields, but no longer affects the password manager.
As of Chrome v34, autocomplete="off" is now ignored by default.
This somewhat debatable feature can be disabled in the flags configuration by visiting chrome://flags
http://news.softpedia.com/news/Chrome-34-Seeks-to-Save-All-Your-Passwords-436693.shtml
If you're able to use JavaScript and jQuery, you can place this on load of the html:
$('#theform input').val('');
Except for Maxthon Browser I think, they are famous in china and making a name now worldwide. They don't treat Autotocomplete=off power very well. It won't work with them.
Some solution is not working in modern browsers.
Another solution link is given here. which works in all modern browsers.
Input type=password, don't let browser remember the password
You can use autocomplete="off" in this given soluton
Matter of fact, both username and password fields doesn't react to AutoComplete=off in all the latest browsers.
td;dr: To check on compatibility across browsers, here is an official MDN doc on turning off autocompletion with the link for compatibility - https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion
A little longer answer: Your issue is because of Chrome's autofill feature, and here is Chrome's stance on it in this bug link - https://bugs.chromium.org/p/chromium/issues/detail?id=468153#c164
To put it simply, there are two cases -
[CASE 1]: Your input type is something other than password. In this case, the solution is simple, and has three steps.
Add name attribute to input
name should not start with a value like email or username, otherwise Chrome still ends up showing the dropdown. For example, name="emailToDelete" shows the dropdown, but name="to-delete-email" doesn't. Same applies for autocomplete attribute.
Add autocomplete attribute, and add a value which is meaningful for you, like new-field-name
It will look like this, and you won't see the autofill (and the value you enter won't be cached) for this input again for the rest of your life -
<input type="text/number/something-other-than-password" name="x-field-1" autocomplete="new-field-1" />
[CASE 2]: input type is password
Well, in this case, irrespective of your trials, Chrome will show you the dropdown to manage passwords / use an already existing password and show the prompt to update the cached password. Firefox will also do something similar, and same will be the case with all other major browsers. Have a look at the MDN doc link I shared at the very top.
In this case, if you really want to stop the user from seeing the dropdown to manage passwords or the prompt to save the credentials, you will have to play around with JS to switch input type, as mentioned in the other related questions.