- Kusonjululiwe
- Okugcinwe kunqolobane
FireFox Loads Every ASP page twice. Debugging assistance needed
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… (funda kabanzi)
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
%>