Thomas
Thomas

Reputation: 463

How to properly update a live website?

Assuming I have users on a page of my site.

I modify a javascript file and update my server.

The problem is that users will not notice the difference until reload the page.

What to do?

Generate a token, do a comparison on all requests to detect outdated code, and reload the page to request via redirect?

And if no request is sent to the server? How to update the javascript file? Check from time to time if the version of the application has changed?

Upvotes: 0

Views: 828

Answers (1)

Braunson
Braunson

Reputation: 717

I suggest using something Like Comet http://en.wikipedia.org/wiki/Comet_%28programming%29

This way you don't specifically have to re-load the users page.

Upvotes: 1

Related Questions