--- title: "Retrieving Data from the Web Browser Using getHASH" slug: "retrieving-data-from-the-web-browser-using-gethash" updated: 2025-07-04T10:07:15Z published: 2025-07-07T11:23:03Z canonical: "docs.onespan.com/retrieving-data-from-the-web-browser-using-gethash" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.onespan.com/llms.txt > Use this file to discover all available pages before exploring further. # Retrieving Data from the Web Browser Using getHASH ## Description This function allows you to retrieve the web browser properties of the device (fingerprint raw). The optional Boolean parameter includeViewport (with false as the default value) specifies whether the following, highly volatile, values will be retrieved: - Browser window width - Browser window height > If includeViewport is set to true, the same device or browser will send different fingerprint values, and will therefore be considered as different devices or browsers. > > OneSpan highly recommends not setting includeViewport to true when retrieving the fingerprint hash to prevent devices from being considered different while changing the size of the browser window. ## Syntax CDDC JavaScript for modern UI: ```javascript //esm-module.jsimport {getJSON} from 'path_to_CDDC_js' ... const result = getJSON([optional boolean includeViewport=false]); ``` Legacy CDDC JavaScript: ```javascript //jquery $.Vasco.getJSON([optional boolean includeViewport=false]) ``` ## Examples #### CDDC JavaScript for modern UI and React framework: ```javascript //Retrieve raw fingerprint and store it into React state variable import React,{ Component } from 'react'; //including reference to CDDC JavaScript import { getJSON  } from '../lib/cddc.esm'; class Test extends Component {  constructor(props){    super(props);    this.state = {      fingerprint: ''    };  }  componentDidMount() {    //Retrieve browser fingerprint, without viewport information    const fingerprint = getJSON(false);    this.setState({      fingerprint: fingerprint    });  } } export default Test ``` #### Legacy CDDC JavaScript: ```javascript //Retrieve raw fingerprint and write it into input box //#TextAreaCDDCFingerPrintJSon' $('#TextAreaCDDCFingerPrintJSon').val($.Vasco.getJSON(false)); ``` #### Example of function result: ```javascript {browser:{"userAgent":Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; rv:11.0) like Gecko},support: {"ajax":true,"boxModel":undefined,"changeBubbles":true,"checkClone":true,"ch eckOn":true,"cors":true,"cssFloat":true,"hrefNormalized":true,"htmlSerialize ":true,"leadingWhitespace":true, "noCloneChecked":false,"noCloneEvent":true,"opacity":true,"optDisabled":true ,"style":true,"submitBubbles":true,"tbody":true},computer: {"screenWidth":1920,"screenHeight":1080,"OS":"Microsoft Windows","platform":"Win32"},additional:{}} ```