Sawtooth Software: The Survey Software of Choice

Disable Back Button in Browser

I would like to disable the back button in all browsers so that a respondent can't use the browser to go back to previously-asked questions. How do I do this?

SSI Web has a built-in mechanism to disable the back button in most major browsers (see the Survey Settings > Browser Settings > Disable Browser Back Button check-box). But as you've probably discovered, all browsers may not behave the same way, which means the back button may still work in Chrome, iPhones, and less-known browsers. Below is another technique that may disable the back button functionality in your survey if an HTML5-compatible browser is being used and JavaScript is enabled. It makes use of JavaScript's history.forward method which loads the next URL in a history list. You'll place this code in the Survey Settings > Headers and Footers > HTML Head Tag section where it will disable the browser's back button on all pages in your survey.

<SCRIPT type="text/javascript">
 window.history.forward();
 function noBack() { window.history.forward(); }
</SCRIPT>
</HEAD>
<BODY onload="noBack();" onpageshow="if (event.persisted) noBack();" onunload="">

If you're using older, non HTML 5 versions, the following code may work for you.

<script type="text/javascript">
  function preventBack() {window.history.forward();}
  setTimeout("preventBack()", 0);
  window.onunload = function () {null};
</script>

Sawtooth Software

6:30 AM to 5:30 PM Mountain Time
(GMT-6; GMT-7 Autumn/Winter)
Monday through Friday

Phone: +1 801 477 4700
Fax: +1 801 434 5493
Email: support@sawtoothsoftware.com

We are open!

SKIM Software

9:00 AM to 5:30 PM Central European
(GMT+2; GMT+1 Autumn/Winter)
Monday through Friday

Phone: +31 10 282 3500
Fax: +31 10 282 3560
Email: software@skimgroup.com
Online: www.skimgroup.com

We're open!

Lighthouse Studio

Lighthouse Studio is our flagship software for producing and analyzing online and offline surveys. It contains modules for general interviewing, choice-based conjoint, adaptive choice-based conjoint, adaptive choice analysis, choice-value analysis, and maxdiff exercises.

Try Lighthouse Studio

  Buy Lighthouse Studio