Showing results for 
Search instead for 
Did you mean: 
Level 9

Warning (popup or web page) when downloading files / accessing some sites?

Hi everyone,

I am struggling to have some kind of basic warning for users trying to download specific files (like URL.FileExtension equals "bat" for instance). A popup would be perfect, but a "warning page with confirmation" would be fine too.

Basically the same as ​ from 2012 and 2013.

Something like this:

I have tried to reuse what was done for the coaching page redirection ( ), and it works.

It is using a custom blocking page that uses JavaScript in the blocking page in order to add specific HTTP headers and go forward after the confirmation. As far as I understand, it is also using "tricks" with the way MWG internally handles Coaching in the initial conditions given (Quota.Coaching.IsActivationRequest) to avoid another "fresh" MWG cycle.

I would like to avoid Coaching if possible, if possible, as it seems a bad workaround.

I cannot find a good way to deal with "Continue with download" though, as I cannot see how to avoid an endless loop after clicking the button "Continue with download": It loops to the exact same blocking page because it does not take into account the headers I add, beginning another MWG cycle with the unmodified page.

This loop makes perfect sense of course, and I guess if I wanted to go further in this direction I will have to use Persistent Data Storage in order to "forward" the confirmation and avoid entering the loop after confirmation. Same as basically.

Persistent Data Storage has always seemed pretty dangerous to use as you could very easily overwhelm the MWG by a misconfigured variable growing quickly out of control and blocking the proxy.

Did you face the same need and found a solution, by any chance?

0 Kudos