Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7808703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T03:12:34+00:00 2026-06-02T03:12:34+00:00

Now my channel.html file looks as follows: <?php require_once __DIR__ . ‘/ay/includes/config.inc.php’; session_set_cookie_params(7200, ‘/’

  • 0

Now my channel.html file looks as follows:

<?php
require_once __DIR__ . '/ay/includes/config.inc.php';

session_set_cookie_params(7200, '/' . AY_PROJECT_ID . '/', 'dev.anuary.com', FALSE, FALSE);

session_start();

$cache_expire   = 60*60*24*365;
header("Pragma: public");
header("Cache-Control: max-age=" . $cache_expire);
header('Expires: ' . gmdate('D, d M Y H:i:s', time() + $cache_expire) . ' GMT');
?>
<script src="//connect.facebook.net/<?=$_SESSION['ay']['fb']['user']['locale']?>/all.js"></script>

I’d like to reduce it to a plain HTML file serving:

<script src="//connect.facebook.net/en_US/all.js"></script>

Now, the original all.js is included using:

(function(d){
    var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
    js = d.createElement('script'); js.id = id; js.async = true;
    js.src = 'https://connect.facebook.net/' + ay.locale + '/all.js';

    d.getElementsByTagName('head')[0].appendChild(js);
}(document));

ay.locale is variable that changes based on signed request. Does that make any difference?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T03:12:35+00:00Added an answer on June 2, 2026 at 3:12 am

    You should be “safe” to hard-code the JS SDK, as long as it’s still a version hosted by Facebook. It’s not likely that different locales will be out of sync, and the only difference between the different files is user-facing strings.

    However, I highly recommend using the same URL instead of hard-coding one locale. The reason for this is that if you use two different URLs, the browser may have to download the SDK twice. The library is big, so that could pose a significant UX problem.

    Of course, this is less likely to happen if the user regularly browses other websites that use the en_US SDK and the version in his own locale. If the files are cached, this won’t be an issue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to Spring Integration. I've configured a Spring file inbound-channel-adapter, e.g. <file:inbound-channel-adapter
i have developed a php based app for facebook. now i need to push
I'm trying to port a PHP script to Ruby and until now I only
gcc 4.4.4 c89 I have the following code in my channel.h file typedef struct
Now this isn't a question as to which of the technologies is better, since
Now I'm geting an error: 1>c:\development\document_manager\document_manager\storage_manager.h(7) : error C2079: 'storage_manager::db' uses undefined struct 'sqlite3'
Now I want to export a image in my Project to a folder ,
Now I'm sure this is super easy, I have a function called remove_deposit which
Now that Google App Engine natively supports Django 1.0, I updated with the following
Now I am aware that I probably need to use a ListBox and can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.