• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Smoother redirect

 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, this is a "for dummies" question. I'm doing redirect with

<meta http-equiv="REFRESH" content="0;url=/yadda/yadda">

and it works fine, but it's a little unattractive. The original url shows for a fraction of a second and the page refresh is pretty obvious. Is there any smoother way?

I'm doing a Post-Redirect-Get pattern, thinking about doing the Post via AJAX and the redirect via script to just refresh the current URL.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you using JSP/Servlets? I've noticed that initiating the redirect on the server is "smoother" than on the client. Which makes sense I guess. When initiated from the server, the browser recieves a response with no page to be evaluated. Using a page that contains markup and meta tags that require evaluation may be what's causing your blip.
 
Stan James
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmm, I've always done post-redirect-get by sending a redirect page to the browser. Wonder why it never occurred to me to do it at the server. Will give it a try!
 
Stan James
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Man, the hoops I hadda jump through to make our front controller do a redirect. It's a major perversion of science, turned a developer hook for streaming output into doing the redirect. Worked great, tho. Thanks again!
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Stan James:
Man, the hoops I hadda jump through to make our front controller do a redirect.

I assume that's a piece of technology you're locked into?
 
Stan James
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, originally written by the boss so it's pretty firmly in place.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Stan James:
Yes, originally written by the boss so it's pretty firmly in place.

My condolences.

<mini-rant>How can a front controller that doesn't allow redirects dare call itself a front controller?</mini-rant>
 
reply
    Bookmark Topic Watch Topic
  • New Topic