cdn

Versioning in a CDN

坚强是说给别人听的谎言 提交于 2019-12-22 08:44:01
问题 Is there any way of achieving a similar versioning solution on a CDN ( not Cloudfront, Edgecast in this case) for js and css files as the rather neat one, combining a Rewrite rule and PHP, described in this thread? I don't know of a way of making that PHP/mod-rewrite combination work on a CDN, change my versions often, and don't want to do the versioning manually. I use a cookieless, entirely separate domain to serve static content, so I have to specify the full url in the function. For

require js loading scripts from cdn fail

安稳与你 提交于 2019-12-22 08:22:50
问题 I am new to RequireJS, and for some reason I cannot load scripts through a CDN. My code: // site full url var siteUrl = window.location.protocol+"//"+window.location.host + "/fresh/"; // requirejs config requirejs.config({ baseUrl: siteUrl + "assets/js/", paths: { "plugins": "plugins", "scripts": "scripts", "jquery": "https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min", "jquery-ui": "https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/jquery-ui.min", "bootstrap": "https://netdna

Automatically deploying assets to Rackspace CDN via git and updating references to those assets?

跟風遠走 提交于 2019-12-22 04:39:04
问题 I'm looking for some help in designing a strategy to automate deployment of a web application's assets (images, css, js) to Rackspace's Cloud Files (CDN) service. I currently use git push to deploy the web app to a remote server. So here's one way I'm thinking this could happen. Are there any better/cleaner methods? Dev makes changes to an asset file (css, js, or an image) Dev commits his changes Dev pushes his changes to the server Assets are automatically renamed to eliminate cache issues

How to prevent exposing origin IP address on Cloudflare?

爷,独闯天下 提交于 2019-12-22 01:48:37
问题 On Cloudflare DNS setting page it state that An A, AAAA, CNAME, or MX record is pointed to your origin server exposing your origin IP address. I have an MX record on my domain pointing to mail.mydomain.com . I believe it is something needed for the mail to work. How can I prevent it from exposing my origin IP address? 回答1: CloudFlare forwards your traffic through their network by replacing the IP in DNS records with CloudFlare's IP. This process works well in all situation except mail servers

List of Facebook CDN addresses

你。 提交于 2019-12-21 12:34:22
问题 I need to compile a list of the addresses of all the CDNs used by Facebook. Example: fbcdn-sphotos-a.akamaihd.net fbstatic-a.akamaihd.net ... I need these for a captive portal application that allows user to connect to WiFi with facebook. We allow facebook.com through the firewall for Graph API calls, but one of the issues we had is that the Facebook login dialog takes forever to load and loads without stylesheets/images. We fixed that by white-listing fbstatic-a.akamaihd.net, but we want to

How to optimally serve and load JavaScript files?

故事扮演 提交于 2019-12-21 12:11:07
问题 I'm hoping someone with more experience with global-scale web applications could clarify some questions, assumptions and possible misunderstandings I have. Let's take a hypothetical site (heavy amount of client-side / dynamic components) which has hundreds of thousands of users globally and the sources are being served from one location (let's say central Europe). If the application depends on popular JavaScript libraries, would it be better to take it from the Google CDN and compile it into

Firebase hosting with cloud functions - how to purge/refresh CDN cache?

不问归期 提交于 2019-12-21 05:16:09
问题 I'm following the instructions from this video and so far things are working perfectly right up to the point where I need to purge the CDN of old HTML: https://www.youtube.com/watch?v=7_2CJs_VZk4 So far I've created a static HTML page using Firebase Cloud Functions, and it is stored on Firebase Cloud Storage. Whenever data from my Firebase Database is updated, a new and updated static HTML page is rendered and is saved to the Cloud Storage. Firebase Hosting serves that static HTML page, and

Script File Executing After Inline Script With CDN or External Domain On HTML injection

£可爱£侵袭症+ 提交于 2019-12-21 04:11:40
问题 I am having an issue with HTML injection into an already loaded DOM where the inline javascript is being loaded after the script file is downloaded. From what I know this should not be async and the inline script should execute after the script file. This works if the domain name is the same as the calling page, but using a CDN or even a subdomain does the same thing. Is there something I should do to rework how I am calling these? I swear this worked before as I had the CDN on for over a

Loading jQuery with RequireJS - Which is better, a local version or a CDN one?

假装没事ソ 提交于 2019-12-21 04:09:11
问题 EDITED to clarify: In terms of performance (though that's still a wild term, I know), which is better - loading a local version, or a CDN version of jQuery, over RequireJS? For the record, RequireJS online doc contains some passage that seems to discourage CDN using, though I am not really sure 100% about what it means: Do not mix CDN loading with shim config in a build. Example scenario: you load jQuery from the CDN but use the shim config to load something like the stock version of Backbone

Setting up Amazon Cloudfront without S3

一笑奈何 提交于 2019-12-21 02:38:13
问题 I want to use Cloudfront to serve images and CSS from my static website. I have read countless articles showing how to set it up with Amazon S3 but I would like to just host the files on my host and use cloud front to speed up delivery of said files, I'm just unsure on how to go about it. So far I have created a distribution on CloudFront with my Origin Domain and CName and deployed it. Origin Domain: example.me CName media.example.me I added the CNAME for my domain: media.mydomain.com with