Firstly haworth used CH3I/Ag2O with glucose which replaced 5 H by CH3 forming a acetal which locked the anomer and stopped the equilibirium of ring chain tautomerism. Under dilute acidic conditions acetal group hydrolyze and ethers do not.
So my text (Organic chemistry by L.G. Wade 8th edition) says through these reactions haworth suggested that C5 contains free hydroxyl group and hence proved the pyranose(6 membered cyclic ring) form of glucose. But I fail to understand how did he find that the hydroxyl group is present on the 5th carbon in the chain after hydrolyzation by dilute acid.