Browse Source

Update post.md

pull/16298/head
Salih 3 years ago
parent
commit
7b6969b382
  1. 30
      docs/en/Community-Articles/2023-04-17-How-to-Optimize-Your-ASP.NET-Core-Web-Application-for-Improved-Performance/post.md

30
docs/en/Community-Articles/2023-04-17-How-to-Optimize-Your-ASP.NET-Core-Web-Application-for-Improved-Performance/post.md

@ -2,7 +2,7 @@
If you want your ASP.NET Core web application to perform well, you need to optimize it for speed, responsiveness, and user experience. Performance optimization is critical for factors like fast page load times, improved response efficiency, and happy users. In this article, I'll provide several tips and tricks to help you optimize performance in ASP.NET Core.
🚀 Use Response Compression
## 🚀 Use Response Compression
You can use ASP.NET Core's built-in response compression middleware to compress response data and reduce the amount of data that needs to be transferred over the network. To use response compression, add the following code to your application's Startup.cs file:
```javascript
@ -15,7 +15,7 @@ services.AddResponseCompression(options =>
app.UseResponseCompression();
```
🖼️ Optimize images:
## 🖼️ Optimize images:
Images can be a major contributor to page bloat and slow load times. Here are some tips for optimizing images:
@ -43,7 +43,7 @@ Images can be a major contributor to page bloat and slow load times. Here are so
</script>
```
🧱 Optimize HTML:
## 🧱 Optimize HTML:
The structure and organization of HTML can affect page speed. Here are some tips for optimizing HTML:
@ -55,7 +55,7 @@ The structure and organization of HTML can affect page speed. Here are some tips
🧱 Use semantic HTML elements (like nav, section, and article) to provide additional structure and meaning to the page.
🎨 Optimize CSS and JavaScript:
## 🎨 Optimize CSS and JavaScript:
CSS and JavaScript files can be a major contributor to page load times. Here are some tips for optimizing CSS and JavaScript:
@ -63,15 +63,15 @@ CSS and JavaScript files can be a major contributor to page load times. Here are
🔩 Use the "defer" or "async" attributes for script tags to delay or asynchronously load scripts.
🔡 Use system fonts:
## 🔡 Use system fonts:
Loading custom fonts can be slow and increase page load times. Using system fonts can improve page speed by allowing the browser to use fonts that are already installed on the user's device.
🖼️ Use Placeholders and Progress Indicators:
## 🖼️ Use Placeholders and Progress Indicators:
To improve the perceived performance of your website, you can use placeholders and progress indicators for slow-loading sections of your page. You can use JavaScript to load these sections after the initial page load.
Example:
💻 Example:
```html
@ -87,20 +87,20 @@ Example:
```
🔗 Use appropriate link text and ARIA labels:
## 🔗 Use appropriate link text and ARIA labels:
When using links, use appropriate link text that accurately describes the content of the linked page. This can improve accessibility and also help with SEO.
Also, use ARIA labels to provide additional context for links. This can improve accessibility and also help with SEO.
Example:
💻 Example:
```html
<a href="https://example.com/" aria-label="Go to Example">Example</a>
<a href="https://example.com/" aria-label="Go to Another Example">Another Example</a>
```
🌐 Optimize third-party resources:
## 🌐 Optimize third-party resources:
Third-party resources like social media widgets and advertising scripts can slow down page load times. Here are some tips for optimizing third-party resources:
@ -108,4 +108,12 @@ Third-party resources like social media widgets and advertising scripts can slow
🔍 Only load third-party resources that are necessary for the page.
By following these optimization techniques, you can significantly improve the page speed of your ASP.NET Core web application.
By following these optimization techniques, you can significantly improve the page speed of your ASP.NET Core web application.
## What is ABP Framework?
ABP Framework offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET and the ASP.NET Core platforms. It provides the fundamental infrastructure, production-ready startup templates, modules, themes, tooling, guides and documentation to implement that architecture properly and automate the details and repetitive work as much as possible.
If you are starting a new ASP.NET Core project, try [abp.io](https://abp.io/) now...
**IT IS FREE AND OPEN-SOURCE!**

Loading…
Cancel
Save