Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tag Helpers for CDNs #102

Closed
danroth27 opened this issue Apr 21, 2015 · 5 comments
Closed

Tag Helpers for CDNs #102

danroth27 opened this issue Apr 21, 2015 · 5 comments
Labels
Milestone

Comments

@danroth27
Copy link
Member

danroth27 commented Apr 21, 2015

MVC -> Views -> Working with CDNs

  • Tag helpers: link, script, img

[Edit Rick-Anderson] #2785
[Edit Tom Dykstra] commit with deleted article stub

@danroth27 danroth27 added this to the Backlog milestone Dec 15, 2015
@danroth27 danroth27 added the Pri1 label Feb 26, 2016
@danroth27 danroth27 added the TOC label May 19, 2016
@danroth27 danroth27 modified the milestones: 1.0.0-rc2, Backlog May 19, 2016
@danroth27 danroth27 added Pri2 and removed Pri1 labels May 19, 2016
@danroth27 danroth27 modified the milestones: 1.0.0-rc2, 1.0.0 May 22, 2016
@tdykstra tdykstra modified the milestones: Backlog, 1.0.0 Dec 5, 2016
@bmgarelick1
Copy link

I have created an Azure Web App using MVC and EF. The main objective is to serve video media. I am currently using Google CDN but have not found a clear sample of code that shows how to manage and deliver the media from the MVC web app interacting with the Google CDN. Or, for that matter, the Microsoft Azure services.

@guardrex
Copy link
Collaborator

guardrex commented Jan 12, 2017

@bmgarelick1 For link and script, you'll probably want to take a look at the <environment> Tag Helper ... https://github.com/aspnet/MusicStore/blob/dev/samples/MusicStore/Views/Shared/_Layout.cshtml#L57-L70 and https://github.com/aspnet/MusicStore/blob/dev/samples/MusicStore/Views/Shared/_Layout.cshtml#L9-L21 ... which allows you to swap local assets for CDN-based assets based on the environment (Development, Staging, Production, etc.).

I personally use image sources directly from the CDN, even in development. If they don't already offer a Tag Helper for images, you could build your own. https://docs.microsoft.com/en-us/aspnet/core/mvc/views/tag-helpers/authoring

@bmgarelick1
Copy link

bmgarelick1 commented Jan 12, 2017 via email

@spboyer
Copy link
Contributor

spboyer commented Feb 9, 2017

Should be covered by #2698

@Rick-Anderson Rick-Anderson removed the TOC label Mar 21, 2017
@Rick-Anderson Rick-Anderson changed the title Working with CDNs Tag Helpers for CDNs Mar 21, 2017
@Rick-Anderson
Copy link
Contributor

Fixed by by #2698

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants