Browser.html diffrent from the page source - watir-webdriver

Hi,

if I go to a page using watir-webdriver+ruby, and right click and view
source on firefox I see following code:

Your home

if I do browser.html in ruby it gives:
Your home

Why? and suppose I have input files which contains strings like:
Your home

I want to match with html source, but due to this problem it fails. Any
solution?

If this is consistent it might just be the order in which watir is
processing the elements. You’d probably be best off making a check which
allows for the attributes to be in different orders, or sorts them
before checking for differences.

Joel P. wrote in post #1086689:

If this is consistent it might just be the order in which watir is
processing the elements. You’d probably be best off making a check which
allows for the attributes to be in different orders, or sorts them
before checking for differences.

Thats a great solution, but isnt it costly? I guess there may be some
cheap solutions.