Code Toolbox

What I can determine about you from your browser alone

Our browsers send off quite a bit of information about us now. Using the fingerprintJS library I was able to abstract this information. Browser Used: language: color_depth: pixel_ratio: resolution: available_resolution: timezone_offset: session_storage: local_storage: indexed_db: cpu_class: navigator_platform: do_not_track: regular_plugins: canvas: canvas winding:yes~canvas webgl: adblock: has_lied_languages: has_lied_resolution: has_lied_os: has_lied_browser: touch_support js_fonts

Read More

Close Window

A close window function is useful when you use a pop-up window on your page, as it allows the visitor to easily close the window. You can do it several ways: To use a button, paste the following where you want the button to appear: <form> <input type=button value=”Close Window” onClick=”javascript:window.close();”> </form> For a text…

Read More

Obtaining reffering Page in javascript

Determining the reffering page is a awesome information for SEO analytic, rather then posting back to the server. Well display it, You can do so using a few lines of code, as shown here. Place the code where you want the IP address to appear: <SCRIPT LANGUAGE=”JavaScript”> var ip = ‘<!–#echo var=”REMOTE_ADDR”–>’; document.write(“Your IP address…

Read More

Obtain IP address

Sometimes showing viewers there own IP address can deter malicious intent, <SCRIPT LANGUAGE=”JavaScript”> var ip = ‘<!–#echo var=”REMOTE_ADDR”–>’; document.write(“Your IP address is” + ip); </script>  

Read More