Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

FireFox Loads Every ASP page twice. Debugging assistance needed

more options

I have a shopping cart that is now breaking, despite working without a hitch for many years. The behavior happens only when using the FireFox browser. Does not happen on Chrome, Edge, Android, etc. I am seeing this behavior from any customer visiting the cart using FireFox. Every ASP page loads twice. A customer puts quantity 1 in their cart, they are presented with an order of 2. I have traced execution, and every ASP page loops thru twice.

After significant debugging, I have the problem stripped down to the simplest form. ASP page consisting of nothing but VBScript which writes a record to a SQL database. Every write happens twice. Debugger shows 2 GETs -- the ASP page and Favicon.ico Tried to nullify favicon, but the problems remained

Below is the stripped down code. Fairly basic. Creates 1 record in the SQL database under other browsers, creates 2 records under FireFox. Any assistance would be most appreciated. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

<% 'DEFINE SQL DATABASE CONNECTION STRING

dim pDatabaseConnectionString, pTrapDbErrors

' database (access, sqlserver, mysql) private const pDataBase = "sqlserver"

' input string filterin type (1-3 being 1 hard, 3 light) pFilteringLevel = 1

' SQL Server local or remote IP in SERVER=

 pDatabaseConnectionString = "Provider='SQLOLEDB';Data Source=HARBORSALES;Integrated Security='SSPI';Initial Catalog='HarborSales'"

' error debug level, trap common DB errors pTrapDbErrors=-1 %> <% ' MAIN ROUTINE -- WRITE A SINGLE RECORD TO THE TABLE. ' THIS ROUTINE RUNS TWICE IN FIREFOX, ONLY ONCE IN OTHER BROWSERS on error resume next

call customerTracking("dummyTrack2.asp", request.querystring)

%>

<% ' SQL INSERT STATEMENT INTO THE DATABASE function customerTracking(pAction, pMisc)

dim rstempgSN, pIdCustomer, pDate, pHour

  mySQL="INSERT INTO customerTracking (idCustomer, action) VALUES ('99','dummy')"
 call updateDatabase(mySQL, rstempgSN, "customerTracking")    

end function %>

<% ' CALLED DATABASE ROUTINES HERE. 'OPENDB(), UPDATEDB(), CLOSEDB() function openDb()

if varType(Cnxn)=0 or varType(Cnxn)=1 then   
  set Cnxn	= CreateObject("ADODB.Connection") 
    
  Cnxn.Open pDatabaseConnectionString
end if   
 
  set openDb = Cnxn

end function


sub updateDatabase(mySQL, rs, scriptName)

 on error resume next 
  set Cnxn = openDb()
  set rs = CreateObject("ADODB.Recordset")
 Cnxn.execute(mySQL)

end sub


function closeDB()

 on error resume next
 rs.close
 set rs 		= nothing 
 Cnxn.close
 set Cnxn	 	= nothing

end function

%>

I have a shopping cart that is now breaking, despite working without a hitch for many years. The behavior happens only when using the FireFox browser. Does not happen on Chrome, Edge, Android, etc. I am seeing this behavior from any customer visiting the cart using FireFox. Every ASP page loads twice. A customer puts quantity 1 in their cart, they are presented with an order of 2. I have traced execution, and every ASP page loops thru twice. After significant debugging, I have the problem stripped down to the simplest form. ASP page consisting of nothing but VBScript which writes a record to a SQL database. Every write happens twice. Debugger shows 2 GETs -- the ASP page and Favicon.ico Tried to nullify favicon, but the problems remained Below is the stripped down code. Fairly basic. Creates 1 record in the SQL database under other browsers, creates 2 records under FireFox. Any assistance would be most appreciated. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <% 'DEFINE SQL DATABASE CONNECTION STRING dim pDatabaseConnectionString, pTrapDbErrors ' database (access, sqlserver, mysql) private const pDataBase = "sqlserver" ' input string filterin type (1-3 being 1 hard, 3 light) pFilteringLevel = 1 ' SQL Server local or remote IP in SERVER= pDatabaseConnectionString = "Provider='SQLOLEDB';Data Source=HARBORSALES;Integrated Security='SSPI';Initial Catalog='HarborSales'" ' error debug level, trap common DB errors pTrapDbErrors=-1 %> <% ' MAIN ROUTINE -- WRITE A SINGLE RECORD TO THE TABLE. ' THIS ROUTINE RUNS TWICE IN FIREFOX, ONLY ONCE IN OTHER BROWSERS on error resume next call customerTracking("dummyTrack2.asp", request.querystring) %> <% ' SQL INSERT STATEMENT INTO THE DATABASE function customerTracking(pAction, pMisc) dim rstempgSN, pIdCustomer, pDate, pHour mySQL="INSERT INTO customerTracking (idCustomer, action) VALUES ('99','dummy')" call updateDatabase(mySQL, rstempgSN, "customerTracking") end function %> <% ' CALLED DATABASE ROUTINES HERE. 'OPENDB(), UPDATEDB(), CLOSEDB() function openDb() if varType(Cnxn)=0 or varType(Cnxn)=1 then set Cnxn = CreateObject("ADODB.Connection") Cnxn.Open pDatabaseConnectionString end if set openDb = Cnxn end function sub updateDatabase(mySQL, rs, scriptName) on error resume next set Cnxn = openDb() set rs = CreateObject("ADODB.Recordset") Cnxn.execute(mySQL) end sub function closeDB() on error resume next rs.close set rs = nothing Cnxn.close set Cnxn = nothing end function %>

Chosen solution

Got It!! Definitely the interaction between FireFox, Windows IIS, and HTTP/2 There is an option in the IIS bindings for HTTPS to Disable HTTP/2 That did the trick. Who woulda thunk it.

Again, thanks for all your efforts to help isolate the problem. It is most appreciated.

Dave

Read this answer in context 👍 0

All Replies (15)

more options

Please ignore helpfox102's post and don't call that number   -   it's a scam !

more options

Hi Dave, your ASP code should run the same for each request, but perhaps Firefox is sending the request twice.

Could you look at Firefox's Network Monitor and see whether in fact Firefox sends the POST twice when you click submit (or whatever it is that happens client side)? The Network Monitor is the Nework panel of the Developer Tools, similar to the Network panel of Chrome or Edge if you have used those. More info on MDN here:

https://developer.mozilla.org/docs/Tools/Network_Monitor

Some possible reasons for double-POST:

https://www.google.com/search?q=firefox+asp.net+double+post

more options

Thanks. Nothing in Network Monitor. There is no SUBMIT or POST Load the ASP, perform the VBScript which updates a SQL table, move on. That's it. It's really simple. Which FireFox does TWICE and everyone else does ONCE

more options

Firefox doesn't execute the VBScript. Do your webserver logs show two requests for the page from Firefox?

more options

Good question. Thank you. Yes, the logs show 2 entries one after the other. Single hit to FireFox, 2 entries in the log. Again, the exact same code (reproduced above scaled down to the basics) works on Edge, Chrome, and Android, fires twice on FireFox

more options

What response code does the log show being sent to Firefox for the two requests? It would be hard to understand why Firefox would want to second a second request if the first response was 200.

more options

Just refreshed the page. Here are the log entries. 1 refresh - 2 entries

2020-06-07 00:10:16 192.168.0.3 GET /_showCart.asp - 443 - 24.96.37.10 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64;+rv:77.0)+Gecko/20100101+Firefox/77.0 - 200 0 64 27 2020-06-07 00:10:16 192.168.0.3 GET /_showCart.asp - 443 - 24.96.37.10 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64;+rv:77.0)+Gecko/20100101+Firefox/77.0 - 200 0 0 92 2020-06-07 00:10:16 192.168.0.3 GET /favicon.ico - 443 - 24.96.37.10 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64;+rv:77.0)+Gecko/20100101+Firefox/77.0 - 404 0 64 0 2020-06-07 00:10:16 192.168.0.3 GET /favicon.ico - 443 - 24.96.37.10 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64;+rv:77.0)+Gecko/20100101+Firefox/77.0 - 404 0 2 139

more options

Let's look at the four numbers at the end of the log entry. If your IIS logs like mine, they are the following:

sc-statussc-substatussc-win32-statustime-taken
20006427
2000092

According to various websites, the Windows error code 64 usually indicates the browser did not confirm (ACK) that it received the response. Could Firefox have requested, reset, and re-requested the same URL? Or is something else going on here?

Could you compare the Network Monitor? Make sure to open the Network Monitor before doing the refresh.

more options

Network Monitor screen print attached Again, this is a public shopping cart and any customer browsing using FireFox hits every page twice. Only happens with FireFox.

As an example from earlier today.: 2020-06-06 23:15:45 192.168.0.3 GET /images/vivilux/VL-Green-Laser-Box.png - 443 - 69.11.86.133 Mozilla/5.0+(Windows+NT+6.1;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/83.0.4103.61+Safari/537.36 https://harbor-sales.com/viewItem.asp?idProduct=7825&idAffiliate=6 200 0 0 9737 2020-06-06 23:15:45 192.168.0.3 GET /images/vivilux/VL-Green-Laser-w-Box.png - 443 - 69.11.86.133 Mozilla/5.0+(Windows+NT+6.1;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/83.0.4103.61+Safari/537.36 https://harbor-sales.com/viewItem.asp?idProduct=7825&idAffiliate=6 200 0 0 10102

Note the IP, note the time-stamps. Same machine, same session, page returned twice. Code is 200 It is consistent with the FireFox browser.

I very much appreciate your help. It's subtle, but there is a cause. I just can't see it.

more options

Just realized -- I can eliminate the SQL entirely and just hit the ASP page with just this:

<% on error resume next

 response.write "Hello World"

%>

Nothing else -- just "Hello World"

1 entry non-secure port 80 Behavior I've seen -- 2 entries -- secure port 443

Here's the result:

2020-06-07 02:04:43 192.168.0.3 GET /_xshowCart.asp - 443 - 24.96.37.10 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64;+rv:77.0)+Gecko/20100101+Firefox/77.0 - 200 0 64 1 2020-06-07 02:04:43 192.168.0.3 GET /favicon.ico - 443 - 24.96.37.10 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64;+rv:77.0)+Gecko/20100101+Firefox/77.0 - 404 0 64 1 2020-06-07 02:04:43 192.168.0.3 GET /_xshowCart.asp - 443 - 24.96.37.10 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64;+rv:77.0)+Gecko/20100101+Firefox/77.0 - 200 0 0 169 2020-06-07 02:04:43 192.168.0.3 GET /favicon.ico - 443 - 24.96.37.10 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64;+rv:77.0)+Gecko/20100101+Firefox/77.0 - 404 0 2 22

TWO entries x 2 GETs in the IIS log !

Here's Chrome's entry: 2020-06-07 02:08:29 192.168.0.3 GET /_xshowcart.asp - 80 - 24.96.37.10 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/83.0.4103.61+Safari/537.36 - 200 0 0 148

ONE entry x 1 GET

So why does FireFox have a problem with Port 443?

Modified by Dave Riba

more options

Firefox allows multiple homepages in separate tabs, maybe you inadvertently set the same page twice? Those separate pages have a pipe symbol | between them in the "Homepage" dialog box.

http://support.mozilla.com/en-US/kb/How+to+set+the+home+page

more options

Okay, after reading a bunch more old threads about this problem, I think it is related to HTTP/2. Firefox 36+ defaults to using HTTP/2 with your server. Chrome for some reason uses HTTP/1.1 with the site. When I test with HTTP/2 enabled (default configuration), Firefox's Network Monitor does not show the status code, but if I disable HTTP/2, then it does. See the attached screenshot comparison.

So there is some kind of communication snafu between Firefox's HTTP/2 and IIS10 on this. It doesn't appear to be a new issue, but I'm not sure of the best solution. You can configure IIS10 not to use HTTP/2 or perhaps there is some newer workaround.

more options

Thanks for your help. We are definitely barking up the right tree. Now for the correct combination. Based on your earlier post:

Under the Parameters folder, add 2 new DWORD (32-bit) values: EnableHttp2Tls and EnableHttp2Cleartext

did NOT work. Interestingly, setting the DWORD value to 1 gave double posts for both secure and non-secure attempts.

So still working it, but getting closer. Your time spent helping track things down is definitely appreciated

Dave

more options

Chosen Solution

Got It!! Definitely the interaction between FireFox, Windows IIS, and HTTP/2 There is an option in the IIS bindings for HTTPS to Disable HTTP/2 That did the trick. Who woulda thunk it.

Again, thanks for all your efforts to help isolate the problem. It is most appreciated.

Dave

more options

Good luck with the store!