Talk:Include files

From Facebook Developer Wiki

Jump to: navigation, search
  • Doesn't work in Profile Application Tabs?!? - 03/21/2009-1200*

Contents

[edit] What about access to top-level JavaScript objects like window, eval, and Object?

FB is rewriting all of my JavaScript code by prefixing all variables with a unique key. The problem is that I use global objects/functions such as window, window.setTimeout, eval, and Object. But these two are preppended with with key. Is there any way to access these objects?

[edit] Next

This isn't working with my CSS file. I tried style, link and script with the src as my css, it just isn't working... anybody? -N

I added a working CSS example.  Just include a link rel="stylesheet" tag with the full URL to your stylesheet, and Facebook will cache it for you automagically.  - Shanti

[edit] Linked (link) CSS is not working for me either

I tried the example <link> html in the article (modified the href of course) and also tried inserted the css statically within the <style> tags, with and without the type attribute, but still no go. The id attributes get mangled, which is what is specified in the documentation (don't know if it should also mangle the class attributes which it isn't for me), but for both options the link/style html is removed when its served to the client.

Also forgot to mention that this is on the mobile platform.

[edit] Any way to turn off default caching while in dev mode?

It's really annoying to have to keep updating the version if I'm creating my css from scratch on a new project. Or am I missing something here?

Agreed, caching should DEFINITELY be OFF when the app is in dev mode. It's super annoying having to bump the v. number of the CSS every time I change it. 122612996 17:47, 14 April 2008 (PDT)

[edit] Relative URL's

How are relative URL's in src/href handled? Relative to what are they? 587721567 11:39, 4 May 2008 (PDT)

It seems like you must use absolute URL's otherwise an error message is returned. 587721567 12:07, 4 May 2008 (PDT)

[edit] Profile Tabs

Why does the script tag (with src attribute) not work in tabs in the new profile? This is pretty inconsiderate considering some people are porting existing canvas (with external scripts) code into the tabs. --192000478 09:43, 15 August 2008 (PDT)

[edit] Maximum Include File Size

The cacheing wasn't working for us. We used firebug and realized the call to the cached file was returning a 500 error. We read the response and learned that the included file size must be less then 64kb! Im not sure if this applies to included css though.

[edit] Beta Note

I'm having no trouble at all getting external CSS to work, but the article suggests that it is still in Beta. Is this still an issue for a lot of people? If not, I think the warning should be removed. --1641273433 08:36, 13 July 2009 (PDT)

I removed it. It's been out for quite a while. Thanks, Pete (563683308 12:10, 13 July 2009 (PDT))
reference