Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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