1

Say you've got a purely static website. It's popular so people are often visiting your index.html. What happens when you use your ftp client to overwrite the file? Will people ever see any odd results? Will all requests simply hang until the writing is done? Or do webservers do anything clever to serve the old file while the new file is being written?

What if it's a script that overwrites index.html? Is that the same as using ftp? Does it depend on the server?

2

There's a chance the would get a blank page if they visit while the transfer is in progress. If the transfer hangs or there's a connection problem while uploading the new file.

I've seen cases while uploading a CSS file, refreshing the page no CSS rendered since the file didn't fully upload or I refreshed just as the file was being replaced with the newly uploaded file.

It's nothing to worry about just make sure you have a backup before overwriting the file, your visitors will likely think it's their browser and refresh the page.

  • 1
    I will add that the "blank page" problem can be mitigated somewhat by caching pages at the server level, say for 20-30 minutes. So during the few seconds of uploading, the server is still serving the cached file, then a few minutes later the new file will be served. – DisgruntledGoat Oct 6 '13 at 16:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.