Live data from Hacker News

How to serve Django Statics (and not go insane)

blog.sendhub.com

21–30 of 34 posts

Re: How to serve Django Statics (and not go insane)

#21

Anyone know what proxies still don't like foo.js?v=1 style URLs? I thought we were past this. Also, a static build process (a la require.js) solves a lot of these for you in a way that's not specific to Django or any other framework. You also don't end up bloating your web app code with the concern for how static files are to be processed, which I personally like a lot. Another way to go is to use Google's mod_pagesp…

"Most proxies, most notably Squid up through version 3.0, do not cache resources with a "?" in their URL even if a Cache-control: public header is present in the response. To enable proxy caching for these resources, remove query strings from references to static resources, and instead encode the parameters into the file names themselves."

https://developers.google.com/speed/docs/best-practices/cach...

Re: How to serve Django Statics (and not go insane)

#22
I've been using CloudFlare on a project and have been mostly very pleased with it.

The only persistant problem that I haven't been able to iron out is that some non-US users of my application can't get any of our javascript assets to load in Google Chrome correctly. VPNing into a US IP seems to fix the problem. Has anyone else had any issues like this?

Re: How to serve Django Statics (and not go insane)

#26
post #22

I've been using CloudFlare on a project and have been mostly very pleased with it. The only persistant problem that I haven't been able to iron out is that some non-US users of my application can't get any of our javascript assets to load in Google Chrome correctly. VPNing into a US IP seems to fix the problem. Has anyone else had any issues like this?

That is very interesting. I am very keen to know if this is a widespread problem.

Have you filed a ticket with CloudFlare or contacted them about this problem?

Re: How to serve Django Statics (and not go insane)

#28
post #22

I've been using CloudFlare on a project and have been mostly very pleased with it. The only persistant problem that I haven't been able to iron out is that some non-US users of my application can't get any of our javascript assets to load in Google Chrome correctly. VPNing into a US IP seems to fix the problem. Has anyone else had any issues like this?

That is very interesting. I am very keen to know if this is a widespread problem. Have you filed a ticket with CloudFlare or contacted them about this problem?

Yes, I opened a ticket with them a few weeks ago. Still working with them on a resolution.

Re: How to serve Django Statics (and not go insane)

#29
post #27

> breaking anyone who doesn’t have support for GZIP What client doesn't have support for gzip?

Should not matter. The server should only send compressed data if the clients sends a request with the header "Accept-Encoding: gzip, deflate", which indicates that there is support for compressed responses.
Post reply on HN