Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8273640

Define application-wide WebEngine user data directory

    XMLWordPrintable

    Details

    • Subcomponent:
      web
    • CPU:
      generic
    • OS:
      generic

      Description

      A DESCRIPTION OF THE PROBLEM :
      Feature Request:
      A way to define a user data directory for __all__ WebEngines of an application, including those that are not directly under control in our base.

      Use Case:
      We have multiple Fx apps for our users. Our users complain about the placement of the WebEngine user data directories for the different apps placed directly in their user directory (e.g. on Linux: $HOME/.helloworld.HelloAnimation/ ). They would prefer it if they would all be placed in e.g. $HOME/.cache/.helloworld.HelloAnimation/ .

      We can set WebEngine#setUserDataDirectory for WebViews/WebEngines that we directly control in our code. However, if we want to do it for __all__ WebViews/WebEngines (including future ones), it becomes a bit more cumbersome - instead of using e.g. new WebView(), we would have do use some kind of factory method that configures the WebView's engine. However, for WebViews/WebEngines created by third-party code (or even JavaFX itself - see HTMLEditorSkin), we obviously cannot enforce the user of our factory method. As soon as any one WebEngine uses the default user data directory, the undesired directories will be created again.
      This is where a way to define an application-wide WebEngine user data (base) directory would be useful.

      Known Workarounds:
      None we know of that reliably work for __all__ WebEngines in an application (including those from JavaFX skins, third-party libraries, etc. which can be added to the Scene Graph at any time).



        Attachments

          Activity

            People

            Assignee:
            arapte Ambarish Rapte
            Reporter:
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: