1.1 --- a/src/main/webapp/WEB-INF/jsp/site.jsp Mon Aug 02 15:13:04 2021 +0200 1.2 +++ b/src/main/webapp/WEB-INF/jsp/site.jsp Mon Aug 02 17:04:17 2021 +0200 1.3 @@ -30,6 +30,9 @@ 1.4 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> 1.5 <%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> 1.6 1.7 +<%-- Version suffix for forcing browsers to update the CSS / JS files --%> 1.8 +<c:set scope="page" var="versionSuffix" value="20210802"/> 1.9 + 1.10 <%-- Make the base href easily available at request scope --%> 1.11 <c:set scope="page" var="baseHref" value="${requestScope[Constants.REQ_ATTR_BASE_HREF]}"/> 1.12 1.13 @@ -54,6 +57,9 @@ 1.14 <%-- Define an alias for the additional stylesheet --%> 1.15 <c:set scope="page" var="extraCss" value="${requestScope[Constants.REQ_ATTR_STYLESHEET]}"/> 1.16 1.17 +<%-- Define an alias for the optional JS file --%> 1.18 +<c:set scope="page" var="javascriptFile" value="${requestScope[Constants.REQ_ATTR_JAVASCRIPT]}"/> 1.19 + 1.20 <%-- Load resource bundle --%> 1.21 <fmt:setLocale scope="request" value="${pageContext.response.locale}"/> 1.22 <fmt:setBundle scope="request" basename="localization.strings"/> 1.23 @@ -70,15 +76,18 @@ 1.24 <c:if test="${not empty redirectLocation}"> 1.25 <meta http-equiv="refresh" content="0; URL=${redirectLocation}"> 1.26 </c:if> 1.27 - <link rel="stylesheet" href="lightpit.css" type="text/css"> 1.28 + <link rel="stylesheet" href="lightpit.css?v=${versionSuffix}" type="text/css"> 1.29 <c:if test="${not empty feedHref}"> 1.30 <link rel="alternate" type="application/rss+xml" title="RSS Feed" href="${feedHref}"/> 1.31 </c:if> 1.32 <c:if test="${not empty extraCss}"> 1.33 <c:forEach items="${extraCss}" var="cssFile"> 1.34 - <link rel="stylesheet" href="${cssFile}" type="text/css"> 1.35 + <link rel="stylesheet" href="${cssFile}?v=${versionSuffix}" type="text/css"> 1.36 </c:forEach> 1.37 </c:if> 1.38 + <c:if test="${not empty javascriptFile}"> 1.39 + <script src="${javascriptFile}?v=${versionSuffix}" type="text/javascript"></script> 1.40 + </c:if> 1.41 </head> 1.42 <body> 1.43 <div id="mainMenu">