Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Using a separate domain for static files

edited October 2011 in Vanilla 2.0 - 2.8
Are there any plans for adding the option to have all static content on the forum be delivered via a separate domain? This way you can set that domain to not deal with any cookies and plug in a CDN easier.
I'll just open a feature request on github once I get some feedback.

Best Answer

  • Options
    ToddTodd Chief Product Officer Vanilla Staff
    Answer ✓
    There are no plans to have an option to have all static content on the forum be delivered via a separate domain. However, there is the PageSpeed plugin that does partial content and Vanilla's got all of the tools for you to write a plugin that does exactly as you want.

Answers

  • Options
    Er this isn't answered but apparently clicking the notification of a deleted post just set it as so.
  • Options
    Not sure why you need another domain just to serve up static content.

    You can modify cache headers with an apache htaccess file to serve files as static cacheable, you don't need another domain for that.

    There was an error rendering this rich post.

  • Options
    This doesn't directly have to do with caching at all. Using a separate domain will prevent the browser from sending cookies along with the request making them lest costly and faster. It would also allow you to easily plugin to a CDN.
  • Options
    ToddTodd Chief Product Officer Vanilla Staff
    We do this on our hosted service with a custom plugin, but have no plans to put it into core. If you want to be pointed in the right direction, we hooked in to the HeadModule_BeforeToString_Handler event.
  • Options
    SS ✭✭
    edited October 2011
    What is "all static content"?
    Plugin PageSpeed has option parallelize downloads.
  • Options
    By static content, I guess they mean images, cached CSS files, etc, etc.
    If I think further it could be every item that's generated once by PHP and then kept in the cache till the content of that item changes (CSS style changes, logo / image changes). Something like that?

    There was an error rendering this rich post.

  • Options
    What is "all static content"?
    Plugin PageSpeed has option parallelize downloads.
    The equivalent would be the option to specify a URL to prefix all static (css/js/image) files with, similar to what you do with pulling jquery from a CDN, except that that CDN path is changeable and applies to not only header items as Todd mentioned, but all vanilla static content, including local images linked throughout the page.

  • Options
    ToddTodd Chief Product Officer Vanilla Staff
    Answer ✓
    There are no plans to have an option to have all static content on the forum be delivered via a separate domain. However, there is the PageSpeed plugin that does partial content and Vanilla's got all of the tools for you to write a plugin that does exactly as you want.
  • Options
    I do this with wordpress use dropbox as a CDN. Great idea.

    I also load JSONP meta from dropbox, which works very well. When I have new images I want to put in my scrolling gallery, I have a python script which does all them image processing, thumbnails and generates the meta. It is great as a hot update.

    Todd pointed you in the right direction.

    grep is your friend.

  • Options
    The hook mentioned may work for headers, but as mentioned I would like all images to work. Does there exist a hook for adding images?

    Assuming there isn't this took a few minutes to quickly hack up: https://gist.github.com/1316978
    If Garden.CDN is set whenever we write out an asset or smartasset just prepend the CDN URL to the asset path.
  • Options
    edited October 2011
    I guess I'll file a bug but the SmartAsset and Asset functions are entirely the same, literally line for line.
Sign In or Register to comment.