Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to disable loading of images by JavaFX WebEngine?

ttiltJun 2 2014 — edited Jun 6 2014

I've searched everywhere but found no way to disable loading of images by Java WebEngine. Does anyone know how to do it?

Research done:

I found some ideas, such as using URL.setURLStreamHandlerFactory() to use my own URLStreamHandler, and having that analyze the URL to only return URLConnections for URL's that don't end in .jpg .png etc. But that has many problems: Sometimes the image url doesn't end in .jpg, if it's a dynamic image, such as a captcha. So how can I disable automatic image loading from WebEngine?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 4 2014
Added on Jun 2 2014
6 comments
3,228 views