[RESOLVED]304 not modified response.

I am running the following script on the client-side and the script is failing to update, when there is change in the database.  I debugged the script using DevTools and discovered my Jquery scripts are responding back as "304 not modified".

   <script src="../Scripts/jquery-1.6.4.js"></script>
    <script src="../Scripts/jquery-1.6.4.min.js"></script>
    <script src="../Scripts/jquery.signalR-2.1.2.min.js"></script>
<script src='<%: ResolveClientUrl("~/signalr/hubs") %>'></script>
<script type="text/javascript">
    $(function () {
        // Declare a proxy to reference the hub.          
        var notifications = $.connection.NotificationHub;
        // Create a function that the hub can call to broadcast messages.
        notifications.client.recieveNotification = function (role, descrip) {
            // Add the message to the page.                    
            $('#spanNewMessages').text(role);
            $('#spanNewCircles').text(descrip);            
        };
        // Start the connection.
        $.connection.hub.start().done(function () {
            notifications.server.sendNotifications();
            alert("Notifications have been sent.");
    
        }).fail(function (e) {
            alert(e);
        });
        //$.connection.hub.start();
    });
</script>
<h1>New Notifications</h1>
<div>

    <br />
    <b>New   <span id="spanNewMessages"></span> = role.</b><br />
    <b>New   <span id="spanNewCircles"></span> = descrip.</b><br />   
</div>

My question is, what does this mean and could this be the reason, the client-side is failing to update. 

Please advice.  Thank you.

Hi missy,

missy786

I debugged the script using DevTools and discovered my Jquery scripts are responding back as "304 not modified".

As for your problem, you could refer to the following link.

Best Regards,

sw-ing

Hi missy,

Thanks for your post.

missy786

I debugged the script using DevTools and discovered my Jquery scripts are responding back as "304 not modified".

This does not really indicate an error, but rather indicates that the resource for the requested URL has not changed since last accessed or cached. As for this problem, you could refer to the following link.

Hope it will be helpful to you.

Best Regards,

Fei Han

Leave a Reply