Solved

Does Facebook cache server-side files in Facebok apps?

Posted on 2012-03-13
5
576 Views
Last Modified: 2012-06-21
We've fixed a bug in the registration process in our our FB app and it's working fine and we can see that people can register.

But why do we still get SOME complaints from other users that they can’t register? Is this due to Facebook caching our old server-side files
0
Comment
Question by:melwong
  • 3
  • 2
5 Comments
 
LVL 6

Expert Comment

by:johndoeherty
ID: 37719190
Hi Mel,

yes, Facebook caches server side files: images, js and CSS files are often the culprits. One way to ensure the latest version is in their cache is to add a query string to the files you want updated, ie. change

...src=my_script.js...
to
...src=my_script.js?x=123...

This technique is called 'cache-busting' and is often necessary during development.  If you're using a scripting language you can add some random string (like time() in php) to the query like
<?
$cache_bust = time();
?>
...src=my_script.js?x=<?= $cache_buster ?>
This way you can easily switch it off when everything is ok.

Another thing to check is it might be a browser issue.
And last, did you set up everything for https?

Hope this helps

JD
0
 

Author Comment

by:melwong
ID: 37719321
actually I'm referring to server side files like PHP, or htaccess. Images, Css are client side
0
 
LVL 6

Expert Comment

by:johndoeherty
ID: 37721474
Images, css are client side
I think you're mixing something up there...
And if anyone can access your htaccess file from the web you have a real big security problem!

You have to supply more information if you seriously want a solution:
How does the registration process work?
What does it mean when a user says he can't register?
Any error message?
What type of browser is he using?
A link to your app would make sense...

JD
0
 

Author Comment

by:melwong
ID: 37722777
Sorry, I'm referring to PHP files.
0
 
LVL 6

Accepted Solution

by:
johndoeherty earned 150 total points
ID: 37723805
Then the answer is 'no', facebook does not cache your php files.

JD
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
This article will take you step-by-step through the basics of ad creation on facebook. You will learn how to create ads for mobile newsfeed, desktop newsfeed, and right column. 1. Login to your Facebook account. In the left column, click on “Crea…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now