Web Browsers
We ran into a very odd issue earlier today. The problem at hand was that Firefox was sending 2 requests on each new page it visited when browsing a site. We tested on all the popular browsers and none replicated the same behavior. First we thought that it might have been a plug-in we installed for our browsers. After uninstalling every plug-in the problem was still there.
After an exhausting research we found that very few stumbled onto the same problem. The odd part is that this worked fine for us on our live server, however it did not on our local servers. We tested on different Apache setups and all the same outcome with Firefox. We also tested Firefox on windows and the same problem would come up.
The solution was rather odd and there seems to be no explanation as to why it needs to work this way other then the fact that it organizes the block structure. The fix was to move a certain JavaScript block of code after the meta character set.
So instead of:
<script type="text/javascript"> <!-- var oModules = {}; // --> </script> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
We switched it to:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <script type="text/javascript"> <!-- var oModules = {}; // --> </script>
Problem solved.
I have never come across such an issue based on the ordering of meta or script blocks nor can we find it mentioned on W3C.
Overall, glad the problem was solved; although still need to find why ordering of blocks within an HTML header would cause such a problem. In the end glad we ran into this problem as we got the ordering of blocks out of the way since it was something I wanted to look into at a later time.
While working on phpFox2 today I noticed the following JavaScript error on each page:
userAgentButton is null
I first thought it was a compatibility issue with jQuery and some new JavaScript code I added, however looking over the logs I didn't add any new JS code so that did not seem to be the problem.
Many problems I have faced in the past when dealing with Firefox was because of plug-ins so the next thing I checked was if I had any plug-ins related to modifying user agents, which I did. I installed the add-on User Agent Switcher a few weeks ago. I disabled it and restarted Firefox and everything was in order. I didn't bother to look for an update for the add-on as I haven't used it since the first time I tried it out, however I am sure there is another fix if anyone plans on using the add-on.


