[FX.php List] PHP Header vs. Javascript location.replace ?
Joel Shapiro
jsfmp at earthlink.net
Wed Jul 19 17:00:09 MDT 2006
Great info. Thanks to both of you for your responses.
I'll be happy to get rid of the javascript.
-Joel
On Jul 19, 2006, at 3:51 PM, Kevin Futter wrote:
> On 20/7/06 8:37 AM, "Joel Shapiro" <jsfmp at earthlink.net> wrote:
>
>> Last year at DevCon Lance Hallberg recommended using a javascript
>> location.replace instead of php header (something about problems
>> loading a header more than once?)
>>
>> <script language="javascript">
>> <!--
>> location.replace("./Form2.php");
>> -->
>> </script>
>>
>> Any thoughts?
>>
>> -Joel
>
> Anyone using any modern browser can turn JavaScript off, so please
> don't
> rely on ANY JavaScript technique for basic or required
> functionality. It's
> much better to handle this kind of redirect from the server. Multiple
> headers can cause problems, but they will be fewer and more easily
> managed
> than the corresponding JavaScript problems. People relying on
> assistive
> technologies (screenreaders etc) for their browsing likely don't
> have access
> to JavaScript at all.
>
> If you do decide to use the above JS solution, just be aware that
> the HTML
> comments surrounding the statement are redundant in a modern web
> setting,
> and will in fact cause problems in a strict XHTML environment.
>
> --
> Kevin Futter
> Webmaster, St. Bernard's College
> http://www.sbc.melb.catholic.edu.au/
>
>
>
> ------------------------------------------
> This e-mail and any attachments may be confidential. You must not
> disclose or use the information in this e-mail if you are not the
> intended recipient. If you have received this e-mail in error,
> please notify us immediately and delete the e-mail and all copies.
> The College does not guarantee that this e-mail is virus or error
> free. The attached files are provided and may only be used on the
> basis that the user assumes all responsibility for any loss, damage
> or consequence resulting directly or indirectly from the use of the
> attached files, whether caused by the negligence of the sender or
> not. The content and opinions in this e-mail are not necessarily
> those of the College.
>
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
More information about the FX.php_List
mailing list