[jQuery] OT: Browser history object and the back button
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16544" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=465184416-11122007><FONT face=Arial size=2>I recently
implemented a mashup of client and server side detection used to collect
information about a user's environment:</FONT></SPAN></DIV>
<DIV><SPAN class=465184416-11122007><FONT face=Arial size=2>OS,
</FONT></SPAN><SPAN class=465184416-11122007><FONT face=Arial size=2>Browser,
</FONT></SPAN><SPAN class=465184416-11122007><FONT face=Arial size=2>Bandwidth,
</FONT></SPAN><SPAN class=465184416-11122007><FONT face=Arial
size=2>JavascriptEnabled, </FONT></SPAN><SPAN class=465184416-11122007><FONT
face=Arial size=2>etc.</FONT></SPAN></DIV>
<DIV><SPAN class=465184416-11122007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=465184416-11122007><FONT face=Arial size=2>When the user first
visits the site, we first try to redirect them with JS:</FONT></SPAN></DIV>
<DIV><FONT face=Arial
size=2>location.href='mainfile.cfm?hasJS=true';</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><SPAN class=465184416-11122007><FONT face=Arial size=2>If they don't have
JS, we default to a meta redirect:</FONT></SPAN></DIV>
<DIV><SPAN class=465184416-11122007><FONT face=Arial size=2><meta
http-equiv="refresh" content="0;url=mainfile.cfm?hasJS=false"
/></FONT></SPAN></DIV>
<DIV><SPAN class=465184416-11122007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=465184416-11122007><FONT face=Arial size=2>The problem is that
when users click the back button from mainfile, they're instaly redirected right
BACK to mainfile. They CAN get past it, but you have to click the back button
twice in quick succession. Anyway, we're getting pinged by Google because of
this change we made. </FONT></SPAN><SPAN class=465184416-11122007><FONT
face=Arial size=2>We're considering some sort of check using the History object
to get around this issue. <SPAN class=465184416-11122007><FONT face=Arial
size=2>I wonder if any of you have run into this situation, and how you handled
it.</FONT></SPAN></FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV align=left><SPAN style="FONT-SIZE: 14px"><B><FONT face="Century Gothic">
<DIV align=left><SPAN class=159130414-05012007><FONT face=Arial size=2><SPAN
class=159130414-05012007><FONT face=Arial
size=2>____________________________________</FONT></SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=159130414-05012007><FONT face=Arial size=2><SPAN
class=159130414-05012007></SPAN></FONT></SPAN> </DIV>Andy
Matthews<BR></FONT></B></SPAN><SPAN style="FONT-SIZE: 11px"><FONT
face="Century Gothic"><SPAN
style="FONT-SIZE: 8.5pt; FONT-FAMILY: 'Century Gothic'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA; mso-no-proof: yes">Senior
ColdFusion Developer</SPAN><BR></FONT></SPAN><SPAN style="FONT-SIZE: 11px"><FONT
face="Century Gothic"><FONT color=#808080><IMG alt="" hspace=0
src="cid:465184416@11122007-051C" border=0><BR></FONT>Office: 877.707.5467
x747<BR>Direct: 615.627.9747<BR>Fax:
615.467.6249</FONT></SPAN></DIV>
<DIV><SPAN style="FONT-SIZE: 11px"><FONT
face="Century Gothic">amatthews@dealerskins.com<BR><A
href="http://www.dealerskins.com/">www.dealerskins.com</A></FONT></SPAN></DIV>
<DIV> </DIV></BODY></HTML>