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

view page source out of sync with browser

  • 7 trả lời
  • 1 gặp vấn đề này
  • 1 lượt xem
  • Trả lời mới nhất được viết bởi cor-el

more options

It used to be that viewing page source displayed the exact source that had been sent to your browser. Now, instead of doing that, viewing page source gets a new load of page source data, so it does not match what is in the browser.

Steps to reproduce problem. 1. View this link, which shows the time when the page is requested: view-source:http://devserver-002.info/test.php

2. Wait at least one second and then view page source. Expected result: page source will show the same time as is displayed in the main browser window. Actual result: The time is updated to when the page source view was requested.

Is it possible to view page source matching what is in the browser, in the case where the data on the page changes every second?

It used to be that viewing page source displayed the exact source that had been sent to your browser. Now, instead of doing that, viewing page source gets a new load of page source data, so it does not match what is in the browser. Steps to reproduce problem. 1. View this link, which shows the time when the page is requested: view-source:http://devserver-002.info/test.php 2. Wait at least one second and then view page source. Expected result: page source will show the same time as is displayed in the main browser window. Actual result: The time is updated to when the page source view was requested. Is it possible to view page source matching what is in the browser, in the case where the data on the page changes every second?

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

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

more options

I might suggest Fiddler or Wireshark to get an idea of what is requested when you click on view page source.

more options

You would have to use select all and view selection source to see the DOM generates source to prevent Firefox from pulling the source from the server.

I think that Firebug can display the original source, so maybe give that a try.

The Inspector should also show the current source in the HTML pane.

more options

Followup question: Why did Firefox change its handling of View Page Source? I have updated this link to explain what I mean.

http://devserver-002.info/test.php

Thank you.

more options

Much better answer provided at this thread: https://support.mozilla.org/en-US/questions/1093470

When page source is viewed with view_source.tab set to false, then the page source matches the rendered page exactly.

This is unfortunate, because the tab is more convenient than a new window for viewing the page source.

more options

The solution of setting view.source.tab no longer works. Try it here.

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

more options

cor-el said

You would have to use select all and view selection source to see the DOM generates source to prevent Firefox from pulling the source from the server. I think that Firebug can display the original source, so maybe give that a try. The Inspector should also show the current source in the HTML pane.

The inspector distorts the page source with its interpretation of the DOM. That is helpful for using the inspector, but not for providing a perfect image of the page source sent by the browser.

more options

You can select the body element and use "Edit As HTML" in the right-click context menu to see the page code. If you open the Inspector as a separate window via its toolbar button then you can maximize that window.

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