Rails dont allow to open another copy of page
I have for example page , and if i copy url and paste in another tab there will be the same page. Ok, this is okey, but i dont want this. Can i make that, if I open in another tab (second, or third) the same url there wil开发者_开发技巧l be flash error and write something like: "Sorry you can open only in 1 tab"?
No, you can't check if page is already opened in browser with Ruby-on-Rails.
I am not sure if you can do it with javascript.
What you can do is to save last_visit time to page and deny to reload it or load anywhere else for current user for particular time: 1 minute, 10 minutes.
精彩评论