Mozilla VPN is currently experiencing an outage. Our team is actively working to resolve the issue. Please check the status page for real-time updates. Thank you for your patience.

Trang web này sẽ có chức năng hạn chế trong khi chúng tôi trải qua bảo trì để cải thiện trải nghiệm của bạn. Nếu một bài viết không giải quyết được vấn đề của bạn và bạn muốn đặt câu hỏi, chúng tôi có cộng đồng hỗ trợ của chúng tôi đang chờ để giúp bạn tại @FirefoxSupport trên Twitter và /r/firefox trên Reddit.

Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Tìm hiểu thêm

Reload button doesnt refresh the page

  • 6 trả lời
  • 3 gặp vấn đề này
  • 10 lượt xem
  • Trả lời mới nhất được viết bởi bradp

more options

Hi, so I started learning to develop websites a while ago, and all was good. However, recently I've had an issue. When I make a change and I'd like to refresh the page, to see it how someone visiting for the first time would see it, the page reloads, however it's exactly the same. For example, I've got 2 buttons. When button 1 clicked, button 2 gets disabled. Refresh the page and... button 2 is still disabled. In other browsers, both buttons return to their "default state". Shift-clicking the reload button does in fact refresh the page as expected. But a normal click, even if the webpage was retrieved from cache, should at least refresh the page, right? I've tried refreshing firefox, so add-ons are not the issue, and this hasn't been an issue before, any help is appreciated.

Hi, so I started learning to develop websites a while ago, and all was good. However, recently I've had an issue. When I make a change and I'd like to refresh the page, to see it how someone visiting for the first time would see it, the page reloads, however it's exactly the same. For example, I've got 2 buttons. When button 1 clicked, button 2 gets disabled. Refresh the page and... button 2 is still disabled. In other browsers, both buttons return to their "default state". Shift-clicking the reload button does in fact refresh the page as expected. But a normal click, even if the webpage was retrieved from cache, should at least refresh the page, right? I've tried refreshing firefox, so add-ons are not the issue, and this hasn't been an issue before, any help is appreciated.

Được chỉnh sửa bởi bradp vào

Giải pháp được chọn

As you have discovered, Firefox may retain and prefill cached form field values and other "page state" when redisplaying a page. I really appreciate that in recent months this site allows that.

If you want a "standard" reload (not holding shift) to default the fields back to their original values and status, you could try preventing Firefox from caching the page -- some developers have said this is difficult because Firefox is rather stubborn about flushing cached pages -- or hook a different event (pageshow) to clear the fields back to default values.

More info in this article: https://developer.mozilla.org/Firefox/Releases/1.5/Using_Firefox_1.5_caching

Đọc câu trả lời này trong ngữ cảnh 👍 0

Tất cả các câu trả lời (6)

more options

Any suggestions on this?

more options

Update: Still no response :(

more options

So sorry for the wait! Your thread slipped thru us somehow.

I was thinking this was caused by a addon that added web dev options to help you debug your site. But since you refreshed Firefox that can't be the case. Although you may have enabled a developer tool option that could be causing this problem like the disable cache setting. But I'm going to ask Jscher, a contributor with web dev experience to help us out here. I'm hoping he can help us figure out what's going on here.

You can really help us out by sharing the link to your site or making it publicly accessible so that we can try it out ourselves and see what might be wrong. Thanks! Btw what other browsers did you test your site in?

more options

Giải pháp được chọn

As you have discovered, Firefox may retain and prefill cached form field values and other "page state" when redisplaying a page. I really appreciate that in recent months this site allows that.

If you want a "standard" reload (not holding shift) to default the fields back to their original values and status, you could try preventing Firefox from caching the page -- some developers have said this is difficult because Firefox is rather stubborn about flushing cached pages -- or hook a different event (pageshow) to clear the fields back to default values.

More info in this article: https://developer.mozilla.org/Firefox/Releases/1.5/Using_Firefox_1.5_caching

more options

Hi, thanks for the responses https://bradleyphillips.co.uk/uni/example.html Is a basic example of what I'm trying to explain. When the start button is pressed the stop button gets disabled, but on page reload the stop button doesn't get re-enabled. In response to jscher2000, are you saying that I'll have to use javascript to refresh the page state on reload? Unfortunately I don't have time right now to read through the link, but I'll have a look in a few hours. Thanks again for the responses, Brad

more options

So I've just found some time to look through the link, and it seems to explain everything, thanks again, brad