Web Page is not showing the latest image

By Sandesh Jadhav M

Given below is the sample code I am using to display images in the browser. Due to system limitations I am using notepad, don’t ask its painful. When I open the page https://…Page Path, the image never gets refreshed even though the image in the back-ground has been changed. The page auto loads the next page but the image stays frozen. Can you please let me know what I am missing. I have done a lot of search on google but was not able to find a solution.

These webpages are created and saved into a SharePoint site and then accessed via the SharePoint site. The SharePoint site although not a web server acts as a web server in this case.

<!DOCTYPE html>
<html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
<head>
<!--[if gte mso 9]><xml>
<mso:CustomDocumentProperties>
<mso:_dlc_DocId msdt:dt="string">HiddenForPublicPosting</mso:_dlc_DocId>
<mso:_dlc_DocIdItemGuid msdt:dt="string">75f7bd3b-7f0a-4379-bd0d-3ab678aa0d87</mso:_dlc_DocIdItemGuid>
<mso:_dlc_DocIdUrl msdt:dt="string">https://HiddenForPublicPosting/_layouts/15/DocIdRedir.aspx?ID=HiddenForPublicPosting, HiddenForPublicPosting</mso:_dlc_DocIdUrl>
</mso:CustomDocumentProperties>
</xml><![endif]-->
</head>
<body>
<script>
var myVar = setInterval(myTimer, 1000);
function myTimer() {
    var d = new Date();
    var hour = new Date().getHours();
    var minute = new Date().getMinutes();
    var greeting;
    document.body.style.backgroundRepeat = "no-repeat";
    if (( hour == 9 || hour == 13 || hour == 17 ) && ( minute <= 4 )) {
            document.body.style.backgroundImage = "url('https://HiddenForPublicPosting/Timer Web Images/Image1.jpg')";
        document.body.style.backgroundAttachment = "fixed";
        document.body.style.backgroundRepeat = "no-repeat";
        document.body.style.backgroundSize = "100% 100%";
    } else if (( hour == 11 || hour == 15 ) && ( minute <= 4 )) {
        document.body.style.backgroundImage = "url('https://HiddenForPublicPosting/Timer Web Images/Image2.jpg')";
        document.body.style.backgroundAttachment = "fixed";
        document.body.style.backgroundRepeat = "no-repeat";
        document.body.style.backgroundSize = "100% 100%";
    } else if (( hour == 10 || hour == 12 || hour == 14 || hour == 16 || hour == 18 ) && ( minute <= 2 )) {
        document.body.style.backgroundImage = "url('https://HiddenForPublicPosting/images/All%20Chennai%20Main.png')";
        document.body.style.backgroundAttachment = "fixed";
        document.body.style.backgroundRepeat = "no-repeat";
        document.body.style.backgroundSize = "100% 100%";
    } else {
        document.body.style.backgroundImage = "url('https://HiddenForPublicPosting/Images/GF%20Main.png')";
        document.body.style.backgroundAttachment = "fixed";
        document.body.style.backgroundRepeat = "no-repeat";
        document.body.style.backgroundSize = "100% 100%";
    }
}
</script>
<meta http-equiv='refresh' content="30;  url='https://HiddenForPublicPosting/KSK_014_RICA_CH_ICG.html' "/>
</body>
</html>

Source: Stack Overflow

    

Share it with your friends!

    Fatal error: Uncaught Exception: 12: REST API is deprecated for versions v2.1 and higher (12) thrown in /home/content/19/9652219/html/wp-content/plugins/seo-facebook-comments/facebook/base_facebook.php on line 1273