Optimization: allowing a different path for static resources

Looking for an Extension? Have an Extension request? Post your request here for help. (Note: This forum is community supported; while there is an Extensions Development Team, said team does not dedicate itself to handling requests in this forum)
Suggested Hosts
Post Reply
colnector
Registered User
Posts: 186
Joined: Tue Aug 19, 2008 5:04 pm
Contact:

Optimization: allowing a different path for static resources

Post by colnector »

Static resources (images/CSS/JS) are currently served from the same server where phpBB resides. The problems it creates:
* Extra load on the app server that could be moved to another server.
* Cookie info is sent on every request and it surely not needed.

The extension should enable providing paths for the static resources and these could reside on other servers. For example, I may want to have phpbb running on forum.example.com and serve all my static resources from static.example.org
Swanny
Registered User
Posts: 486
Joined: Sun Apr 14, 2002 2:11 am
Location: Canada

Re: Optimization: allowing a different path for static resources

Post by Swanny »

Let's call this Enabling CDN usage for static files ...?
colnector
Registered User
Posts: 186
Joined: Tue Aug 19, 2008 5:04 pm
Contact:

Re: Optimization: allowing a different path for static resources

Post by colnector »

I wouldn't call it that as the other server may not be a CDN and many use CDNs without changing links but by changing their DNS records. I think a "Path for static files" should be good or simply allowing a full path in the images directory (and additionally CSS/JS directories) rather than a relative one.
Swanny
Registered User
Posts: 486
Joined: Sun Apr 14, 2002 2:11 am
Location: Canada

Re: Optimization: allowing a different path for static resources

Post by Swanny »

Ah, good point. I would use a CDN service as I do already. But, you may choose to use a separate server (not CDN).
colnector
Registered User
Posts: 186
Joined: Tue Aug 19, 2008 5:04 pm
Contact:

Re: Optimization: allowing a different path for static resources

Post by colnector »

Any answers here?
Holger
Registered User
Posts: 1883
Joined: Tue Mar 12, 2002 3:54 pm
Location: Hannover

Re: Optimization: allowing a different path for static resources

Post by Holger »

What is CDN?
Holger
Registered User
Posts: 1883
Joined: Tue Mar 12, 2002 3:54 pm
Location: Hannover

Re: Optimization: allowing a different path for static resources

Post by Holger »

Thanks!
colnector
Registered User
Posts: 186
Joined: Tue Aug 19, 2008 5:04 pm
Contact:

Re: Optimization: allowing a different path for static resources

Post by colnector »

Anyone interested in taking this to the next step?
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Optimization: allowing a different path for static resources

Post by david63 »

Perhaps I am missing something here but if you are serving all the files what is the advantage of having "static" files on one server and "non static" on another? I would actually think that performance could be made worse as calling two servers would add an overhead and if the servers were not synchronised then you could have the data being rendered in the wrong order.

Now if you were to be taking about caching "static" files then that may well be a different issue but my understanding is that most "static" resources are cached either by phpBB and/or the browser. There have been several discussions on these fora about using the likes of Cloudflare to do additional caching - sometimes with success and other times creating additional problems.
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
colnector
Registered User
Posts: 186
Joined: Tue Aug 19, 2008 5:04 pm
Contact:

Re: Optimization: allowing a different path for static resources

Post by colnector »

Serving static resources from a different server has the following advantages:
1/ Browsers usually limit the number of connection per server so it's faster to serve from different ones.
2/ When logged in you send cookies on every HTTP request. If static resources r on another server, this isn't needed so a bit less communication.
3/ Depending on your server configuration, a server dedicated to static files doesn't need PHP installation.
Post Reply

Return to “Extension Requests”