Open External PDF in Default PDF App

Hi

I’m using this line to open External PDF’s

var ref = window.open(url, ‘_system’, ‘location=yes’);

It works perfect and opens with the Default PDF app when the file name is as follows test.pdf which is perfect

but when the pdf file name has an extra . (dot) in it (example test.test.pdf), it prompts to have the file downloaded instead of opening in the default pdf viewer app