Skip to content

Bits of .NET

Daily micro-tips for C#, SQL, performance, and scalable backend engineering.

  • Asp.Net Core
  • C#
  • SQL
  • JavaScript
  • CSS
  • About
  • ErcanOPAK.com
  • No Access

Tag: http

Ajax / JavaScript

Ajax Requests Succeed but Data Is Outdated

- 07.01.26 - ErcanOPAK comment on Ajax Requests Succeed but Data Is Outdated

Server updated, client not. WhyAggressive caching on GET requests. Fix Add cache-busting headers or query tokens.

Read More
Ajax / JavaScript

Ajax Requests Randomly Return Empty Responses

- 05.01.26 - ErcanOPAK comment on Ajax Requests Randomly Return Empty Responses

No errors, no data. WhyServer closes connection before body flush. FixExplicitly flush response on server side.

Read More
Ajax / JavaScript

AJAX — Browser Caches GET Requests Silently

- 30.12.25 - ErcanOPAK comment on AJAX — Browser Caches GET Requests Silently

Repeated GET calls may not hit the server. ✅ Fix Add cache-busting or proper headers.

Read More
Ajax / JavaScript

AJAX — 204 Responses Break JSON Parsing

- 29.12.25 - ErcanOPAK comment on AJAX — 204 Responses Break JSON Parsing

204 No Content has no body. ❌ Crash response.json() ✅ Fix Check status before parsing.

Read More
Asp.Net Core

Security — URL Length Can Kill Requests

- 28.12.25 - ErcanOPAK comment on Security — URL Length Can Kill Requests

Browsers & proxies limit URL size. ❌ Breaks Large GET filters Search queries ✅ Fix Use POST for complex payloads.

Read More
Asp.Net Core

HTTP — Caching Is Disabled More Often Than You Think

- 28.12.25 - ErcanOPAK comment on HTTP — Caching Is Disabled More Often Than You Think

No cache headers = slower everything. ✅ Add ETag Cache-Control If-None-Match Result: fewer bytes, faster pages, happier users.

Read More
Ajax / JavaScript

AJAX — Network Tab Lies About Timing

- 21.12.25 | 21.12.25 - ErcanOPAK comment on AJAX — Network Tab Lies About Timing

Browser timing includes: DNS SSL Queuing Connection reuse Real insight Use Server-Timing headers for truth.

Read More
Ajax / JavaScript

Silent AJAX Failures — Missing Content-Type

- 16.12.25 - ErcanOPAK comment on Silent AJAX Failures — Missing Content-Type

Backend never hits controller? ✅ Fix headers: { “Content-Type”: “application/json” }  

Read More
ASP.Net WebForms / C#

Display HTPP Headers in C# & ASP.net

- 10.06.18 - ErcanOPAK comment on Display HTPP Headers in C# & ASP.net

using System; using System.Web.UI; using System.Collections.Specialized; public partial class _Default : Page { protected void Page_Load(object sender, EventArgs e) { NameValueCollection headers = base.Request.Headers; for (int i = 0; i < headers.Count; i++) { string key = headers.GetKey(i); string value = headers.Get(i); base.Response.Write(key + ” = ” + value + “<br/>”); } } }

Read More
January 2026
M T W T F S S
 1234
567891011
12131415161718
19202122232425
262728293031  
« Dec    

Most Viewed Posts

  • Get the User Name and Domain Name from an Email Address in SQL (923)
  • How to add default value for Entity Framework migrations for DateTime and Bool (814)
  • Get the First and Last Word from a String or Sentence in SQL (808)
  • How to select distinct rows in a datatable in C# (784)
  • How to make theater mode the default for Youtube (664)
  • Add Constraint to SQL Table to ensure email contains @ (561)
  • How to enable, disable and check if Service Broker is enabled on a database in SQL Server (544)
  • Average of all values in a column that are not zero in SQL (510)
  • How to use Map Mode for Vertical Scroll Mode in Visual Studio (460)
  • Find numbers with more than two decimal places in SQL (427)

Recent Posts

  • C# Value Types Copied More Than You Think
  • C# Async Void Is Dangerous
  • C# Foreach vs For Performance Difference
  • SQL Deletes Lock Tables
  • SQL Queries Slow Despite Indexes
  • .NET Core APIs Feel Slow Under Load
  • ASP.NET Core Memory Grows Slowly
  • Git Conflicts Keep Reappearing
  • Git Rebase Feels Dangerous
  • Ajax Forms Submit Twice

Most Viewed Posts

  • Get the User Name and Domain Name from an Email Address in SQL (923)
  • How to add default value for Entity Framework migrations for DateTime and Bool (814)
  • Get the First and Last Word from a String or Sentence in SQL (808)
  • How to select distinct rows in a datatable in C# (784)
  • How to make theater mode the default for Youtube (664)

Recent Posts

  • C# Value Types Copied More Than You Think
  • C# Async Void Is Dangerous
  • C# Foreach vs For Performance Difference
  • SQL Deletes Lock Tables
  • SQL Queries Slow Despite Indexes

Social

  • ErcanOPAK.com
  • GoodReads
  • LetterBoxD
  • Linkedin
  • The Blog
  • Twitter
© 2026 Bits of .NET | Built with Xblog Plus free WordPress theme by wpthemespace.com