Jump to content

A better redirect instead of header("")


President Obama

Recommended Posts

I don’t recommend, for example, using header() to bounce your users around to different pages; there are better methods that reduce the number of page loads and give the user a more fluid experience.

http://tinsology.net/2009/06/creating-a-secure-login-system-the-right-way/

 

Thats where I saw it.

Link to comment
Share on other sites

..and while doing things like this try to remember accessibility. Have a fallback in case people don't have javascript enabled. As a major benefit, consider a complex filter/sort page which lends itself to being filtered and sorted by nature (like an online store). Using ajax, this entire process can be contained in a single page view without any refresh. Adds to a very seamless user experience.

 

I really think ajax will be used on almost every website in the future. Gives you that 'desktop application' feeling.

Link to comment
Share on other sites

I don’t recommend, for example, using header() to bounce your users around to different pages; there are better methods that reduce the number of page loads and give the user a more fluid experience.

http://tinsology.net/2009/06/creating-a-secure-login-system-the-right-way/

 

Thats where I saw it.

 

in the same article the author explain his point of view:

In the example, when a user registers the script that processes the information is called register.php, while the script that contains the form is called register_form.php. If the user fails to input a certain field then they are bounced back to register_form.php. This is a waste of bandwidth and time. register.php and register_form.php should both be the same script. For example

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.