# Google-chrome – How to have some type of files open directly in a chrome tab

I am using google chrome 77.0.3865.90 on Ubuntu 16.04.6 and I want to make chrome open some types directly in a browser tab.

For example text files with extension .log (example out_L4PC.log) are being opened directly in a broswer tab when I use an URL like some/web/adress/out_L4PC.out.

I have different files, also containing just text, but they end in .err (example out_L4PC.err). I want them to also open directly in the browser tab.

But so far, when I use such an .err file they are being downloaded and opened with a different application. This is not what I want. I do not want these type of files opened with a different application, but directly in the browser, just like .log files.

How to do that?

• The hyperlink you clicked uses the download attribute, or the server responds with a Content-Disposition: attachment HTTP header - in both cases this tells the browser to download the file and save it to your local disk instead of displaying it.
• The resource you clicked returns (in the HTTP headers) a MIME type that the browser does not understand or cannot display (such as application/octet-stream).