Why does Internet Explorer debugger identify javascript file as text/html when in the code and in iis the type is set as application/javascript?

When setting X-Content-Type-Options to “nosniff”, all the javascript files on my website are blocked due to “mime type mismatch”. In my code, I have many javascript files which are used in aspx files. Here are just a few of the declarations from within the aspx file: (note: there are many more) <script type=”application/javascript” src=”../Scripts/OrderEditScripts.js”></script> <script…

blazor (server side) javascript interop: Javascript fails because code must run as user-initiated

I am running into a problem writing data into the clipboard using server-side blazor. The library https://github.com/lgarron/clipboard-polyfill fails to write a text to clipboard after a button press using server-side blazor under firefox V69, but is works under chrome V77. With a plain old javascript html page without blazor the clipboard write works in firefox…

Get selected value of datalist option value using javascript

I need to add some values from a HTML5 DataList to a <select multiple> control just with Javascript. But I can’t guess how to do it. This is what I have tried: <input id=”SelectColor” type=”text” list=”AllColors”> <datalist id=”AllColors”> <option label=”Red” value=”1″> <option label=”Yellow” value=”2″> <option label=”Green” value=”3″> <option label=”Blue” value=”4″> </datalist> <button type=”button” onclick=”AddValue(document.getElementById(‘AllColors’).value, document.getElementById(‘AllColors’).text);”>Add</button>…