Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

FF Browser won't reflect changes made in html file

more options

I am running a web site and just ran into a very disturbing problem. My code won't refresh in firefox browser, but do refresh in Google Chrome.

The thing is, I have added
tags in <body>tag and also added <script>tag in <head> tag.

When I load my page, it still displays the old html. I checked the source file in Chrome and yes, the source file is correct. However, the source file in Firefox still displays the old file(i.e. with no additional divs and script tags). The weird thing is that Network Monitor in Firefox developer tools shows status 200 for the html file, and headers in the details pane shows old info for "last modified file" in response Headers section.

I know refreshing browse setting, clearing cashes, openning the website with private browsing window, or newly reinstalling firefox browser, would solve the problem, but that is not what I want to know.

The difference between Firefox and Google Chrome:

Google Chrome instantly reflects the revised html file just after uploading a molified html file.

Firefox doesn't do that even if I close all tabs and quit firefox then reopen firefox and visit the webpage and repeat this processes multiple times.

My question is, how can I make it refresh the latest html file in users Firefox browsers, without asking users to refresh browser settings. I mean, how can I modify html code, htaccess code or anything to solve that issue?

Any ideas?


Firefox version 77.0.1(64bit)

I am running a web site and just ran into a very disturbing problem. My code won't refresh in firefox browser, but do refresh in Google Chrome. The thing is, I have added <div>tags in <body>tag and also added <script>tag in <head> tag. When I load my page, it still displays the old html. I checked the source file in Chrome and yes, the source file is correct. However, the source file in Firefox still displays the old file(i.e. with no additional divs and script tags). The weird thing is that Network Monitor in Firefox developer tools shows status 200 for the html file, and headers in the details pane shows old info for "last modified file" in response Headers section. I know refreshing browse setting, clearing cashes, openning the website with private browsing window, or newly reinstalling firefox browser, would solve the problem, but that is not what I want to know. The difference between Firefox and Google Chrome: Google Chrome instantly reflects the revised html file just after uploading a molified html file. Firefox doesn't do that even if I close all tabs and quit firefox then reopen firefox and visit the webpage and repeat this processes multiple times. My question is, how can I make it refresh the latest html file in users Firefox browsers, without asking users to refresh browser settings. I mean, how can I modify html code, htaccess code or anything to solve that issue? Any ideas? ------------- Firefox version 77.0.1(64bit)

Chosen solution

For other users, whose Firefoxes aren't going to check again until their cached copy of the page expires, there's not a lot you can do unless they contact you for assistance about updating the page.

Going forward, you could think about shortening the expiration for the cache, or preventing caching of the main page while still allowing caching of resource files. This article has more info on caching in Firefox:

https://developer.mozilla.org/docs/Mozilla/Firefox/Releases/1.5/Using_Firefox_1.5_caching

Read this answer in context 👍 1

All Replies (3)

more options

When you check the Network Monitor, what is Firefox showing for the request. You can check as follows: Open the page. Then open the Network Monitor in the lower part of the tab using either:

  • "3-bar" menu button > Web Developer > Network
  • (menu bar) Tools > Web Developer > Network
  • (Windows) Ctrl+Shift+e

Then reload the page as usual, not clearing or bypassing cache. Does the Transferred column show "cached"?

Aside from shortening the cache expiration, you can change a Firefox preference to see whether this still works:

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button accepting the risk.

(2) In the search box in the page, type or paste doc and pause while the list is filtered

(3) Double-click the browser.cache.check_doc_frequency preference to display an editing field, and change the value to 1 then press Enter or click the blue check mark button to save the change. For reference, the possible values are:

How often to validate document in cache against current page on server:

  • 0 => once-per-session (otherwise, just use cache)
  • 1 => each time requested
  • 2 => never validate / always use cache
  • 3 => when-appropriate/automatically (when page expires from cache) (default)

Does that help?

More info on about:config: Configuration Editor for Firefox.

more options

Chosen Solution

For other users, whose Firefoxes aren't going to check again until their cached copy of the page expires, there's not a lot you can do unless they contact you for assistance about updating the page.

Going forward, you could think about shortening the expiration for the cache, or preventing caching of the main page while still allowing caching of resource files. This article has more info on caching in Firefox:

https://developer.mozilla.org/docs/Mozilla/Firefox/Releases/1.5/Using_Firefox_1.5_caching

more options

Thanks jscher2000.

> Does the Transferred column show "cached"?

Yes, and this info helps a lot, thanks. Changing firefox configuratin is not the answer what I wanted, though.

>Aside from shortening the cache expiration

This solves the issue. Aside from the caching difference between Firefox and Google Chrome, setting on my web server was not enough for that, I think. BTW, the web server is IIS.

Modified by deprog.m.test