For example, the http protocol may need to pop up an authentication dialog. But this is only appropriate if the application is running in a situation where there is a user. The allowUserInteraction flag allows these interactions when true. When it is false, they are not allowed an exception is tossed. This flag applies to the next, and all following, URLConnections that are created.
Some protocols do caching of documents.
If the UseCaches flag on a connection is true, the connection is allowed to use whatever caches it can. If false, caches are to be ignored. The default value comes from DefaultUseCaches, which defaults to true. Some protocols support skipping fetching unless the object is newer than some time. This flag applies to the next, and all following, URLConnections that are created.