Yii Framework Forum: Preventing Actions With Page Refresh - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Preventing Actions With Page Refresh Rate Topic: -----

#1 User is online   Anthony Gough 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 52
  • Joined: 29-October 12

Posted 06 February 2013 - 11:33 PM

I am interested in ideas that developers employ to prevent users doing a page refresh hence re-sending Post data. What is perhaps best practice especially within the Yii Framework. Using sessions seems to be a fairly easy method to implement however opinions vary. Thoughts?
0

#2 User is offline   yasen 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 32
  • Joined: 29-October 11
  • Location:Sofia, Bulgaria

Posted 07 February 2013 - 01:30 AM

This is done by setting flash message, redirect and showing the flash message. http://www.yiiframework.com/wiki/21/
0

#3 User is online   Keith 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,440
  • Joined: 04-March 10
  • Location:UK

Posted 07 February 2013 - 04:18 AM

Yes, and if you're intending to keep the user on the same page, you can use $this->refresh() after setting your flash message in your action.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users