Skip to content

Tag: cross-browser

setTimeout function not working on firefox

I am trying to use <input type=”submit” name=”add” class=”buy” onClick=”setTimeout(‘history.go(0);’,2000);”/> It reloads the page on click after two seconds in chrome but it doesnt work in Firefox. I went through this Why does window.location.r…

Going back to previous page using javascript

Is using JavaScript the most efficient way of navigating back to the previous page when a link or button is clicked? What if JavaScript is disabled on the user’s end (Which most people don’t)? Are there any known issues with cross-browsers? Are there any browsers that don’t support the histo…

Getting a browser’s name client-side

Is there any object or method that returns data about the browser, client-side? For example, I need to detect if the browser is IE (Interner Explorer). Following is the code snippet. Is there a better way? Answer EDIT: Since the answer is not valid with newer versions of jquery As jQuery.browser is deprecated…