firefox keeps reloading existing tabs when i switch

Firefox will unload tabs if you’re running low on memory (for whatever reason). Change these settings in about:config to keep the tabs loaded, and then restart Firefox.

browser.tabs.unloadOnLowMemory = false
accessibility.blockautorefresh = true

References

Weblinks

  1. How To Stop Firefox Tabs From Auto-Refreshing on Tab Switch – Super User
  2. [Fix] Mozilla Firefox Automatically Suspends Tabs and Reloads When You Visit – AskVG

Internet searches

  1. firefox having to reload loaded tabs

Firefox disable a ping

What is an html a ping

An html “a ping” is a characteristic of an <a> tag that is used to track when a link is followed.
An example: the following link to the front page of this blog has an A ping characteristic:
https://bgstack15.wordpress.com

The characteristic looks like:

<a href="https://bgstack15.wordpress.com" ping="https://bgstack15.wordpress.com/ping">https://bgstack15.wordpress.com</a>

Disable html ping in Firefox

In about:config, set:

browser.send_pings = false

References

Weblinks

  1. https://www.thewindowsclub.com/ping-hyperlink-auditing-in-chrome-firefox

Firefox disable recommended extensions

Firefox apparently is trying to jump the shark with even more pocket-esque behavior. This is why I install Pale Moon (and its Linux page) on my new builds instead of Firefox.

I normally schedule my posts, in case you couldn’t tell, for the morning of every fourth day. But this post is going out immediately.

Disable Firefox’s “Contextual Feature Recommender” with this entry in prefs.js:

user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr", false);

You can extrapolate the about:config option.

Other places on the Internet show you how to do it through the gui if you prefer.

References

My own research (diff prefs.js prefs.js.old)

Firefox trust system trusted certificates

last updated 2019-07-11

Mozilla maintains its own certificate store mechanism (nss), and eschews the system trust store.

Somehow, my Fedora systems that are joined to freeipa work correctly with my ipa certs. I suspect Fedora compiles firefox with the directive to read the /etc/ipa/nss directory. On Devuan I have not had success with that location, nor /etc/pki/nss. All of this is still a bit voodoo to me, and it’s sad that Firefox trusts [techrepublic.com] the Windows system trusted root cert store but not the GNU/Linux one.

To programmatically add your root ca certs to the existing firefox profiles, use a shell scriptlet lifted from firefox – Programmatically Install Certificate Into Mozilla [stackoverflow.com]:

certificateFile="MyCa.cert.pem"
certificateName="MyCA Name" 
for certDB in $(find  ~/.mozilla* ~/.thunderbird -name "cert8.db")
do
  certDir=$(dirname ${certDB});
  #log "mozilla certificate" "install '${certificateName}' in ${certDir}"
  certutil -A -n "${certificateName}" -t "TCu,Cuw,Tuw" -i ${certificateFile} -d ${certDir}
done

For new users, you probably need to do this to /etc/skel/.mozilla/firefox/*.default.

Update

An easier way is possible on debian-based distros with the p11-kit package. After installing that package, you can configure Firefox to include the library in the “Security Devices” in about:preferences -> Privacy and Security tab.

Select the “Load” button to add a new entry, and name it something and specify the full path to the library. On Devuan ceres, my file was /usr/lib/x86_64-linux-gnu/pkcs11/p11-kit-trust.so

It would not hurt to restart Firefox, but I think the change was immediate for me.

References

Internet searches

firefox p11-trust

Weblinks

  1. Original https://www.techrepublic.com/article/how-to-add-a-trusted-certificate-authority-certificate-to-chrome-and-firefox/
  2. Kernel of idea for p11-kit https://askubuntu.com/questions/244582/add-certificate-authorities-system-wide-on-firefox/1036637#1036637
  3. Simple instructions https://support.mozilla.org/en-US/kb/setting-certificate-authorities-firefox

Getting Firefox and Java to work with jnlp files

If you are having trouble opening a jnlp file (e.g., for IPMI console access) you can try some of these steps.

Tell Firefox to allow pop-up windows for this site

Tell Firefox how to handle the filetype .jnlp

Tell it to open it with /usr/bin/javaws

Tell Java to allow the site to run applications

If you get “Application Blocked by Java Security” you can fix that by editing an exceptions list.

Modify file ~/.java/deployment/security/exception.sites

Each line in this file should be a protocol and domain name or IP address for the exception, e.g.:

http://172.20.0.19
http://172.20.0.20

References

  1. https://java.com/en/download/faq/java_webstart.xml
  2. https://stackoverflow.com/questions/25949651/openjdk-how-to-add-site-to-exception-list#25950032

Firefox disable don’t load tabs until selected

tl;dr

about:config
browser.sessionstore.restore_on_demand = False

Explanation

When I tell my browser to run, I want it to load all of my previous tabs, as well as actually load the tabs. When I switch to it, it should be fast, because it as already loaded the content. I don’t want it to flash and load upon my selecting the tab; it should already do that!

There used to be an option in Firefox’s preferences for changing this, but it was removed from the gui. But it’s still there in about:config.

References

Weblinks

https://bugzilla.mozilla.org/show_bug.cgi?id=711193#c63

Cannot create items in Google Calendar

If you use Google Calendar in Firefox, you might be unable to add calendar items. It displays this error: “Oops, we couldn’t create this event, please try again in a few minutes.”

A workaround was discovered by a user on the Google Calendar Help Forum.

harpseal said:

I think I found an answer. Delete the google calendar specific cookies and reload. After I did this it lets me create events. YAY! Hope this works for others.

References

Weblinks

  1. https://productforums.google.com/d/msg/calendar/8513S6SqGBY/KiubCBSKBwAJ

Disabling firefox detect captive portal

Story

While working on a dns server on my virtual network, I was tailing the named logs in journald, and I saw a request go through:

detectportal.firefox.com

I thought to myself, “What is that?” I ddged it and found that was a function in firefox that tries to detect if it’s in a captive portal, like at a hotel or other public wifi where you must agree to something before you can access the World Wide Web.
I realize that it is probably fine for firefox to do this, but it’s not necessary. I don’t want my browser doing anything of the sort. I will tell what and when to visit web URLs.

Disabling firefox detect captive portal

In firefox, visit about:config and search for captive.
You can change the values. The easiest one to change is the network.captive-portal-service.enabled. You can change this boolean value to false by double-clicking it.

References

Weblinks

  1. https://bugzilla.mozilla.org/show_bug.cgi?id=1307867