external CSS files are not loading all the time in IE 11. But when I hard refresh the page its loading. Is there any way to ensure External CSS files load properly in IE 11 browser

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<ui:composition>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:c="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets">
<script type="text/javascript" src="path/to/css/css-min.js"></script>
<link rel="stylesheet" type="text/CSS" href="path/to/CSS" />

this is how I included CSS files.

1

There are 1 best solutions below

0
Kendrick Li On

If a hard refresh will make them work, that means your external CSS files are getting cached in the browser and they may not get updated from time to time. You can try specifying the version number of a style sheet to force the browser to update CSS. For example:

<link rel="stylesheet" type="text/css" href="styles.css?version=2">