Mysterious Page Loading Twice Issue
Today I dealt with a very mysterious issue.
Every time a page would load, it seemed to reload.
I cannot actually explain what was happening to be honest... but i was able to track down the culprit to a problematic table tag:
<table border="0" cellpadding="0" cellspacing="0" width="100" background="#DEEFEF" id="sidebartable">
the problem ended up being in the background tag...
once I changed this background tag to bgcolor it worked fine!
<table border="0" cellpadding="0" cellspacing="0" bgcolor="">
This was some extremely bizarre behavior and what I did to debug it: I disabled pieces of code until I could isolate where the issue was stemming from. Even then, it took me a while to see that the tag and fix it. I ended up spending a good 2 hours just isolating the piece of code that was causing the issue. I would never have guessed; I honestly still can't explain it. If you know what is going on, I would love it if you told me.
Labels: 2 loads, coding, HTML, html page, issue with page reloading, page loads 2 times, page loads twice, php, php triggered twice, reloading page
1 Comments:
I figured it out. Since the background property of the table tag is actually looking for a url, it uses the pound sign and thinks that it is actually an anchor on the same page and thus loads it behind the scenes! Be careful when using the background tag; it was probably triggering a bunch of unwanted functionality and I didn't even notice for a few weeks!!
Post a Comment
<< Home