Self-hosting resources in an ASP.Net Core MVC application

ReneKettererKleinsteuber 20 Reputation points
2023-06-27T16:19:28.14+00:00

Hello,

First of all, sorry for my bad english.

I am in the process of learning ASP.NET Core MVC. This is a whole new and previously unknown area for me even after so many years in software development.

Now I have come pretty far with my application, yet I still have some unanswered questions. Two of them concern external resources - I use the following in my application so far:

  • Bootstrap
  • jQuery
  • DataTables
  • FontAwesome

I hope I haven't forgotten anything.

Technical consideration

What is the common approach to embedding such resources? Host them yourself or include them via a CDN?

Privacy Consideration

In any case, embedding via a CDN is more convenient. Apart from the technical advantages and disadvantages, I wonder how this should be judged from a data protection perspective. Since the introduction of the European General Data Protection Regulation, there are things to consider that used to play a minor role - I remember Google Fonts.

I would be very happy to hear your opinions on this.

Greetings

René

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,395 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,187 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,270 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,276 questions
0 comments No comments
{count} votes

Accepted answer
  1. Srinivasulu Mallisetty 75 Reputation points
    2023-06-27T17:24:48.9266667+00:00

    IMO, serving static content from your application will be better due to the following reasons.

    • When we use CDN, browsers need to make a handshake request before downloading the static content. This request can be avoided when you host the static content inside you application.
    • In some of the workplaces or in some different regions(Counties) may have their own regulations and they may block the CDN host which will impact your application behaviour.
    • GDPR: When using through CDN, some of the data may be sent these external websites. Each of them having their own privacy policy. I feel it is better to serve the content through your application when being conscious about the users privacy.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. ReneKettererKleinsteuber 20 Reputation points
    2023-06-28T09:13:41.6666667+00:00

    Hello Srinivasulu,

    thank you for your answer. Yes, you are right. I installed all external resources locally yesterday and included them in my application. Besides the technical aspects, there is also the issue of data protection here in Europe: I cannot exclude that my application will manage personal data in the future. At the latest then I would have a problem.

    Thanks again and best regards

    René

    0 comments No comments