Palemoon using hosts file or not?

Support and discussions for the x86/x64 Linux version of Pale Moon and specific Linux distribution questions related to the browser.

Moderator: trava90

Forum rules
If your question is about general use of the browser and not specific to Linux, then please use the General Support board.
Post Reply
User avatar
ocpaul20
New to the forum
New to the forum
Posts: 2
Joined: 2020-12-26, 02:19

Palemoon using hosts file or not?

Post by ocpaul20 » 2020-12-26, 02:50

I hope someone can help with this one:

I am in China where ALL Google sites are banned, so I place all the Google sites in my hosts file so I do not have to wait for the timeout when the website cannot be accessed.
When I look at the bottom status line I can see the websites being accessed so I would expect the ones I have in the hosts file to be looked up and found as 127.0.0.1 and for the browser to quickly move on to the next website to appear in the status line. I have restarted Palemoon after adding these sites to my /etc/hosts file.

The Google website in question is cse.google.com which seems to stay a long time (~30secs - 1 minute)on the status line when it is accessed("connecting to cse.google.com"), so I am guessing that Palemoon is ignoring the hosts file when looking up websites. How can I reduce the time or get Palemoon to look up the website in the hosts file?

User avatar
moonbat
Moon Magic practitioner
Moon Magic practitioner
Posts: 2535
Joined: 2015-12-09, 15:45

Re: Palemoon using hosts file or not?

Post by moonbat » 2020-12-26, 10:07

Resolving hostnames is the job of your operating system, not Pale Moon or any other application.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 20 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
Advanced URL Builder(fork)|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

User avatar
ocpaul20
New to the forum
New to the forum
Posts: 2
Joined: 2020-12-26, 02:19

Re: Palemoon using hosts file or not?

Post by ocpaul20 » 2020-12-26, 11:14

Yes, I know the hosts file is used by the OS.

However, I was under the impression that browsers in general took a copy of the hosts file when they started and that is what I was asking - whether Pale Moon does the same thing?

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 28796
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: Palemoon using hosts file or not?

Post by Moonchild » 2020-12-26, 11:24

ocpaul20 wrote:
2020-12-26, 11:14
However, I was under the impression that browsers in general took a copy of the hosts file when they started
They don't. They perform DNS lookups like any other internet-enabled applications that needs to look up hosts.
Now, what Pale Moon does do out of a necessity for performance is cache those lookups for a certain amount of time (and so does the O.S. in most cases, for that matter). That means that any changes to it may not be immediately visible in the browser.
"Son, in life you do not fight battles because you expect to win, you fight them merely because they need to be fought." -- Snagglepuss
Image

User avatar
Moonbird
Hobby Astronomer
Hobby Astronomer
Posts: 26
Joined: 2020-01-03, 09:49
Location: Germany

Re: Palemoon using hosts file or not?

Post by Moonbird » 2020-12-26, 19:34

Restarting the browser helps for me, after I've made some changes to the hosts file while browsing. I use the hosts file successfully with any browser.

Post Reply