Hey Fred, thanks for the reply. I've thought about the caching issue, though I'm not sure how to tell if this is in fact the problem. I'm not specifically caching anything in my app, and I've cleared out the localhost data for Safari. Also, all other flash notices in the app work fine, only this one sticks.
As I was discussing this issue with another developer, I decided to make a couple of short screen recordings (YouTube) that demonstrate what this looks like in Safari as compared to Chrome and Firefox. If it helps, you might have a look at these. Perhaps you'll notice something that I'm missing. - Flash issue part 1 <http://www.youtube.com/watch?v=S-kwbx309LQ> - Flash issue part 2 <http://www.youtube.com/watch?v=qLLqKuf0q1Q> Here are some gists which provide more code context: - students_controller.rb<https://gist.github.com/joshukraine/5510d064df6e4983f077> - _top-nav.html.erb<https://gist.github.com/joshukraine/544765c13157753dc166> - application.html.erb<https://gist.github.com/joshukraine/ed17d9101cba605f8cd9> Also, many thanks for the observation about the XSS bug. So far I have not been able to reproduce it though. For example, I entered this: 99999999<script>alert('bad news!')</script>. The search action did see it as numeric, but it stripped out the javascript and just returned a flash saying that a student with ID 99999999 could not be found. I also tried entering it via the URL, but that just crashed the redirect saying "cannot redirect to nil". I guess I thought that Rails was sanitizing this somewhere in the background, but maybe not. Any suggestions? Thanks so much for the help! On Thursday, December 12, 2013 1:36:02 PM UTC+2, Frederick Cheung wrote: > > > > On Wednesday, December 11, 2013 10:37:34 AM UTC, joshukraine wrote: >> >> >> *Thus my question: how can I get Safari to clear the flash after the >> first request?* >> >> I'm aware of the whole "flash vs. flash.now" issue when rendering pages. >> But even then, the flash will disappear if you simply refresh. I actually >> tried flash.now in this case, but then the flash isn't displayed at all in >> any browser. >> >> Since this appears to be a browser-specific problem, here are some >> further stats on my system: >> >> - Mac OS X 10.9 >> - Safari 7.0 >> - Rails 3.2.16 >> >> One final observation. After playing around with this issue in Safari, I >> noticed that if I clicked my bookmark for http://localhost:3000/, that >> would clear the flash. Of course, all the navigation links in my site >> layout contain relative paths, whereas the bookmark is calling a full url. >> >> > Anyway, hope that made sense. Thanks in advance for your help! >> > > Could this be a caching problem? Does the network inspector show fresh > requests being made to your app? > > Unrelated, but I think you have an XSS bug - if i link to your search page > with the search parameter set to 99999999<script>...</script> then I'm > pretty sure that js will get executed (the 99999 is to that to_i returns > non zero) > > Fred > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/eea6c8af-be56-4692-9184-049b8f97da92%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.

