How does Facebook deal with client Browser cache?
-
Nowadays modern browsers do cache javascript, css, images... I imagine that, when Facebook codebase gets updated, browsers have to download the new code/images, etc. The only bulletproof technique I know is changing filenames constantly to bypass browser's cache. Can anybody drop a word about it? If you don't know how facebook is handling it, I'd be pleased to hear your own solutions.
-
Answer:
The way you mention (changing the name) is exactly how Rails does it. The asset pipeline will "compile" your assets which means it will concatenate and minifiy your js, for instance, and then create a file called application-<hash based on the contents>.js. Then there are helper methods in ruby that let you specify load application.js here and it will load the correct file with the correct hash. Then when you change the content the compiled file name changes automatically for you. The same thing happens with css, images, fonts, etc. I'm sue Facebook is doing something simple but in PHP.
Benjamin Darfler at Quora Visit the source
Related Q & A:
- How To Download File From Uc Browser?Best solution by pc.ucweb.com
- How To Download File In Uc Browser?Best solution by pc.ucweb.com
- How can I add extension to browser from ExtJs application?Best solution by Stack Overflow
- How to enable cookies on my browser?Best solution by Yahoo! Answers
- How can I clear my google chrome cache?Best solution by eHow old
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.