Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7092823
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:21:45+00:00 2026-05-28T08:21:45+00:00

Play’s flash is a temporary storage mechanism that is kept for the duration of

  • 0

Play’s flash is a “temporary storage mechanism that is kept for the duration of the next request”, using cookies.

Is it possible to read the flash from javascript?

I want to implement a generic client-side notification mechanism, and also access that mechanism from the server. What I imagine is for any controller to do:

flash.put("notification", "You have been notified");

And then for my main.js to check if the “notification” flash exists, and if it does display it above (similar to Stack Overflow’s notification mechanism).

However, I suspect that flash might be encrypted in a way that the client side cannot read it. I haven’t found any code samples that show how to read it from the client side JS (not in a template). Is this possible directly?

As I’m writing this question, I’m actually coming up with a way to implement this: I can put a hidden div in the main template that all my views extend, and access that div from JS. Does it make sense? Is there a simpler approach?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T08:21:46+00:00Added an answer on May 28, 2026 at 8:21 am

    I don’t think it’s possible to use JavaScript to read flash, even via the cookie. That cookie is actually encrypted with a security seeds (application.secret) configured in your application.conf.

    However it is possible to implement what you want.

    1. Create a tag to export flash variables into Javascript object.
    2. Call that tag in your view.
    3. Your main.js use that exposed variable to do whatever it want.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does play automatically cache data? I'm trying to read this code that someone else
Using play framework 1.2.4 with scala. I have few play jobs that looks like
play framework: 1.2.3 Hi, I am trying to purge my database by using play's
Is it possible to play all the .mp3's within a folder in windows media
Play framework [I'm using v1.2.3] does not support db password encryption stored in the
Play will assign the parameters from request to action parameters, like: public static void
In Play 2.0, with Scala, I want to make a factory that takes an
In play 2.0 you can get the request binding with validation done (via annotations)
a play on a similar question asked by me that was graciously answered. three
Is it possible to play more than one video the same time / on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.