I'm facing an issue with adding a CSS file to my webpage using JavaScript code at the bottom of the page. When users disable JavaScript, the file cannot be added. Is there a way to include the CSS file in the page without relying on JavaScript?
$(document).ready(function(){
var css=document.createElement('link');
css.type='text/css';
css.href='/css/user.css';
css.rel='stylesheet';
document.getElementsByTagName('head')[0].appendChild(css);
});
Instead of directly adding the file to the head section, I am looking for an alternative method, possibly using the <noscript> tag. Any suggestions on how to achieve this without JavaScript?