JavaScript SetTimeout Redirect Not Working with Firefox settimeout redirect not working

I have been working with a page that redirects a user to either an installed application or a webpage (the fallback). This is called when the page first loads via ClientScript.RegisterStartupScript; the Javascript portion looks something like this:

<script type='text/javascript'>var a = window.location.search; setTimeout(function(){ window.location.pathname = '/Fallback.aspx'}, 500); window.location='myapp://open' + a;</script>

So far, this snippet always functions as expected in Google Chrome, redirecting the user to the Fallback page whenever the 'myapp://open' fails to open correctly within the given amount of time. In Internet Explorer, it only works when the timeout value is set to 100 or lower. My problem at this moment is Firefox, which fails to redirect correctly no matter what the timeout value is set to. (For Firefox, I have tried values of as little as 25 and as high as 2000.)

Does anyone know what the Firefox browser might do differently that would prevent it from redirecting, and if so, is there any known workaround for it?

Thank you very much in advance for your time and advice.

UPDATE: The exact error page I am getting from Firefox is titled "The address wasn't understood", with the description similar to the following: "Firefox doesn't know how to open this address, because the protocol (myapp) isn't associated with any program."

UPDATE: To test this, you can replace '/Fallback.aspx' in the code with 'www.google.com'. If this is tried in IE or Chrome, the browser will fail to open myapp://open and should redirect you to Google instead; this is the intended functionality since the application is not installed. However, in Firefox you will likely be left at the error page telling you the protocol is not recognized; it will fail to redirect to the fallback. I hope this helps, and I apologize for the original wording of my question.

Answer:1

I'm trying to send a simple message from a form to my server using socket.io. Sadly enough this is failing, I know the client has a connection with the server, but it does not appear to receive the ...

I'm trying to send a simple message from a form to my server using socket.io. Sadly enough this is failing, I know the client has a connection with the server, but it does not appear to receive the ...

  1. socket.io send form data
  2. socket.io send form

function rolldice() { var x = Math.floor(Math.random() * ((6 - 1) + 1) + 1); var y = Math.floor(Math.random() * ((6 - 1) + 1) + 1); var dicetotal = x + y; var double = 0; $('.dice1'...

function rolldice() { var x = Math.floor(Math.random() * ((6 - 1) + 1) + 1); var y = Math.floor(Math.random() * ((6 - 1) + 1) + 1); var dicetotal = x + y; var double = 0; $('.dice1'...

  1. dice roll javascript code
  2. dice roll js
  3. 3d dice roll javascript
  4. dice roll animation javascript
  5. dice roll game javascript
  6. roll dice function javascript

I want to build a stream graph from data in a .csv file. I forked http://bl.ocks.org/lgrammel/1935509 to generate the stream graph, but I got stuck loading the data. My JS is below. var n = 8, // ...

I want to build a stream graph from data in a .csv file. I forked http://bl.ocks.org/lgrammel/1935509 to generate the stream graph, but I got stuck loading the data. My JS is below. var n = 8, // ...

I have a table that contains a number of input boxes that represent custom tags within the RadEditor, something like this: (td:0) (td:1) Foo value : [______________] Bar value : [______________] ...

I have a table that contains a number of input boxes that represent custom tags within the RadEditor, something like this: (td:0) (td:1) Foo value : [______________] Bar value : [______________] ...