Currently if you click a file in a folder that your browser is able to display itself (HTML, PDF (if configured)) the file is opened in the OLAT-tab so OpenOLAT "disappears". In my experience this leads to some confusion and imho it would be clearer to open a new browser tab for files that are displayed instead of downloaded. What do you think?
After investigation of the current status of current and older browsers we decided to implement the following:
- If the "force download" security setting is enabled in admin->login->security
- all resources have the link attribute "download" with the correct file name
- no target=_blank
- the http header "content-disposition" is set to attachment
- If the "force download" security setting is disabled in admin->login->security
- the same behaviour as when enabled except for HTML pages.
- HTML pages do not have the download attribute
- HTML pages have the target=_blank attribute
- HTML page are opened in the browser and all embedded resources are loaded as well
The behaviour should be that the downloaded resource do download directly and open in the configured tool of the users operating system. E.g. when configured that PDFs should open in Acrobat, the PDF's will open automatically in Acrobat.
This applies to the folder component. Embedding a PDF in a single page is not affected by this change. To get a better result there we need to embed something as PDF.JS, but that is a whole other story....