This blog site is not meant to be any information that is distributed to the general public. It is to serve as shared documentation between the DNSTC developers; however, if you find something useful and would like to use it, go right ahead.

Friday, May 24, 2013

Fixing Buffer Issues

When I started working on SEO for pages, I noticed something strange occurring with errors stating that redirection or sessions could not be started.  Warnings would show up on the top of pages stating that you cannot perform these functions since the headers already started.

I didn’t really think much about them at first, until I started working on a project that needed session variable.  I had to roll up my sleeves and dig a little bit more deeper.
What I have found is that Dreamweaver was adding BOM (Byte Order Mark) characters to the beginning of the files.  These characters are invisible to the browsers, but that are read into the buffer which basically causes the header has already started errors.
At this point, I don’t know why they are added, I just know they cause some issues not only with the header, buffer errors, but also with W3C validation.  So I have just elected to remove them when I come across the problem.
Here is how to remove them:
  1. Edit the file with an editor that allows for hexidecimal editing as well (EditPadPro).
  2. Remove the first three characters from the file, they look like this:     Capture
  3. Save the file.
  4. Problem Resolved.

No comments:

Post a Comment