Tools for diffing two pages / files in a browser

6

2

I want to be able to diff the source of two pages, or even plain text files that are open in two browser windows. The only thing I can find is the PageDiff plugin for Firefox, but is there anything else available (for any browser)?

user1974

Posted 2009-07-26T11:36:31.787

Reputation: 163

Answers

6

I dont know of a tool specific for this, but winmerge is an excellent diffing tool and you can open a new window and paste the source from both pages into the 2 panes and do a diff. A little bit of extra work but will work.

Toby Allen

Posted 2009-07-26T11:36:31.787

Reputation: 2 634

3

I can see where you are coming from,
But, why not just do a wget on the two files and compare with the regular diff utilities?

nik

Posted 2009-07-26T11:36:31.787

Reputation: 50 788

1Perhaps because you aren't using linux? :) – gnarf – 2009-07-26T13:09:16.780

1@gnarf, How about Cygwin? (and there are a lot of other ways to get there). Targeting for a browser based diff solution is harder than most of them. – nik – 2009-07-26T18:33:22.767

What we want finally is a text file diff. A vim based diff will give you a beautiful syntax highlighted view of two HTML source versions. – nik – 2009-07-26T18:38:56.903

1

This might help out. You can use a pastebin service to do this. I like http://dpaste.de so these instructions are based on that site.

  1. Create a new paste item by copying and pasting the first page's source code into the text area (be sure to select HTML as the language type).
  2. After you save the pasted item, you will be directed to the view item page. Scroll to the bottom of that page and click "Write and Answer"
  3. On the Write and Answer page, delete the content and paste in the source of the second HTML page you want to diff.
  4. After saving your answer, you will be directed to another view item page. You will see a History table in the upper right corner of the page. Select the two pages you want to diff and click the "Compare" button to view the diffs in your browser.

It requires a bit of copy/pasting, but overall it's a pretty quick way to get a diff of two files.

shawnr

Posted 2009-07-26T11:36:31.787

Reputation: 472

1

I'm on linux, so I get the two webpages, and type (diff -u -p -N file1.html file2.html > some_diff_file), and after this, I use kdiff.

Etore Marcari Jr.

Posted 2009-07-26T11:36:31.787

Reputation: 161