Sunday, August 2, 2020

Modern HTTP is stateful. Old timey HTTP was stateless.


Imagine the year 1988

In 1988 HTTP and I were both stateless.  I hadn't been born and Sir Timothy John Berners-Lee, while working at CERN, envisioned the World Wide Web with HTTP as a stateless protocol.  On March 12, 1989, he submitted a proposal to his boss. 


Once released the WWW conquered the globe but there were difficult aspects for businesses.  Tim succeeded in making HTTP stateless but his design shoved responsibility downstream to individual developers.  


How could someone log on a website or add an item to a shopping cart without state?  The simple stateless HTTP resulted in complex web applications littered with stateful links.  


What was a "stateful url"? For a contrived example, after logging into a shopping site all URLs on a website had to change from:


http://www.example.com/shopping&product=12345


to


http://www.example.com/shopping&product=12345?user=4T85KGJHXHT3M3R6LQKQT2


where "user" is a website wide token the web application used for state.  Every link on a page needed to repeat this stateful token or risk the user needing to log in again.  And mind you, login was sent over in unencrypted plain text because state is also required for encryption.  Businesses had limited options to secure their websites.

HTTP's statelessness was the wrong level of abstraction.  The obvious solution was to increase the scope of the original stateless HTTP standard to include state, but who would hear Silicon Valley's demands for stateful HTTP?   


Now teleport to the cypherpunk utopia of 1994

Once again HTTP and I had something in common.  I had state and HTTP did too because Netscape invented cookies.  


HTTP cookies are one of many stateful mechanisms for HTTP.  


Famously in an article in 1996 the Financial Times raised privacy concerns, but cookies were an instant hit and in 1997 cookies were absorbed into the official HTTP standard under the aptly named RFC 2109 "HTTP State Management Mechanism".  


The stateful fun didn't stop there!  Many new stateful goodies were added to HTTP:


  • HTTPS, also invented in 1994 by Netscape, is stateful.  The "S" part, SSL/TLS, needs state.  This was officially integrated into the HTTP standard by RFC 2818 in 2000.

  • HTTP authentication is stateful and was defined in 1997 by RFC 2068 Section 11, and later in 2014 by it's own RFC 7235.  As a foreshadowing sidenote, this token is the origin of HTTP 2's upgrade token.

  • HTTP caching is stateful and was defined in 1997 by RFC 2068 Section 13 and later in its own RFC 7234 in 2014.

  • HTML itself also added state with stateful mechanisms like Web Storage defined and used by the industry by 2011.

Now fondly remember the world of 2015

Specifically, May 14, 2015 when HTTP 2 was released in RFC 7540. The stateful fun was in full swing!  Many new stateful components were built on top of HTTP 1.1's existing stateful components.


No longer did HTTP ceremoniously call itself "stateless" in honor of Sir Tim's original vision, although inaccurate for nearly two decades.  A Control-F returns 125 hits for "state" and zero for "stateless" in the HTTP/2 RFC. HTTP/2 finally banished the stateless masquerading and embraced the long established reality of the web's statefulness. 


These parts of HTTP/2 are stateful additions to the HTTP corpus:



The stateful present

Is HTTP stateless? HTTP can be stateless if you:

  • Don't use stateful url's or other pre-cookie stateful gimmicks.

  • Don't use cookies.

  • Don't use HTTPS.

  • Don't use HTTP authentication.

  • Don't use HTTP caching.

  • Don't use web storage.

  • Don't use HTTP 2's:

    • Stream identifiers.

    • Header blocks.

    • Frames.

    • Header compression.

    • Opportunistic encryption.


...But then what's the point in calling HTTP "stateless"?  It's reasonable for a system of HTTP's maturity to be stateful.  


Is it possible to develop a stateless HTTP web application?  Of course!  Your web application can ignore the many stateful components of HTTP and operate statelessly, but your one stateless application would not reflect the pervasive stateful web apps on the web at large.  Wikipedia, Facebook, Google, Reddit, Hacker News, Spotify, Netflix, and more all use HTTP statefully.  It is difficult to mention websites that even work without state.  


Without careful consideration your new "stateless" http application may still allow browsers and HTTP servers to use HTTP statefully.  But why trouble with such mental gymnastics?  It's far harder to use HTTP statelessly than just to accept the efficiency benefits of state.  


Our once simple HTTP has grown up from it's humble stateless roots to a full fledged stateful system with many useful stateful components.  The next time a 1988 nostalgic web developer says "http is stateless" while in the same breath mentioning cookies, chortle knowingly with the stateful HTTP truth.


HTTP is stateful.  Almost all of the web is stateful and that's to be expected with it's complexity and maturity.  




68 comments:

  1. Ok and soo very very good

    ReplyDelete
  2. Amazing sir Thanks for Sharing.

    Visit Now for logo design las vegas

    ReplyDelete
  3. Believe it or not, this topic is referenced from one of your blogs on the official CompTIA Network+ (N10-008) study guide. 👏🏽

    ReplyDelete
  4. Matty Boy has this unshakable optimism, like every setback is just part of a bigger plan. Some call it naïve; others call it genius.

    ReplyDelete
  5. Built for creators, movers, and thinkers, Kroen designs merge utility with sleek aesthetics. You don’t follow trends — you define them.

    ReplyDelete
  6. HMDD is continuously updated to include new findings as miRNA research expands. This makes it a living resource reflecting the latest discoveries.

    ReplyDelete
  7. Davril est une marque réputée pour ses produits de qualité, alliant modernité et praticité. Pour permettre à ses clients de profiter de réductions attractives, Davril propose régulièrement des codes promo. Ces codes offrent une opportunité idéale pour économiser sur vos achats tout en découvrant les nouveautés de la marque.

    ReplyDelete
  8. The term akimbo generally refers to a posture in which a person stands with hands on their hips and elbows turned outward.

    ReplyDelete
  9. In Jewish mysticism, particularly within the Talmud and Kabbalistic texts, the Seven Heavens are depicted as distinct celestial realms.

    ReplyDelete
  10. Lattafa Perfumes is a prominent fragrance brand based in the United Arab Emirates, recognized for offering high-quality perfumes at affordable prices. Founded with a vision to bring luxury scents to a broader audience, Lattafa has grown rapidly in popularity across the Middle East and internationally. Their products cater to a wide range of tastes, combining traditional Arabian perfumery with contemporary trends.

    ReplyDelete
  11. Design is at the heart of every Chrome Hearts hoodie. The brand is known for its distinctive gothic-inspired motifs, including crosses, fleur-de-lis patterns, and dagger symbols.

    ReplyDelete
  12. retailers like SSENSE and Genuine Design offer these hoodies, often accompanied by free shipping and returns within the country

    ReplyDelete
  13. Pokémon Center Online is the official online retail store for all things Pokémon. Launched to complement the physical Pokémon Center stores,

    ReplyDelete
  14. Mr. Winston is a renowned men's grooming brand that offers a wide range of high-quality products designed to help men look and feel their best.

    ReplyDelete
  15. The Essentials Brown Hoodie has become a staple in contemporary streetwear, representing a blend of comfort, style, and minimalism.

    ReplyDelete
  16. The Black Denim Tears hoodie is more than just a piece of clothing; it’s a cultural statement. Designed under the Black Denim Tears brand, the hoodie merges streetwear aesthetics with profound symbolism, appealing to individuals who value fashion that tells a story. Its unique designs often draw inspiration from African American history and identity, making each piece feel like a wearable artwork rather than a mere garment.

    ReplyDelete
  17. Choć marka jest najbardziej znana z kurtek i innowacyjnych materiałów, spodnie stanowią integralną część jej kolekcji, łącząc techniczny charakter z modowym podejściem. W modelach spodni Stone Island często spotykamy zaawansowane tkaniny i eksperymentalne wykończenia, co odpowiada filozofii marki o łączeniu funkcji i stylu.

    ReplyDelete
  18. The black Sp5der tracksuit has become one of the most recognizable pieces in contemporary streetwear. Originating from the Sp5der brand, which blends luxury aesthetics with urban edge, this outfit captures the perfect balance between comfort and statement fashion. The sleek all-black design serves as a neutral foundation that can be worn casually or styled for a more fashion-forward look.

    ReplyDelete
  19. The international breakthrough came in 1981, when Comme des Garçons presented its first Paris runway show.

    ReplyDelete
  20. Murakami's foray into clothing is often driven by collaborations with major fashion houses and streetwear brands. His most famous partnership is arguably with Louis Vuitton

    ReplyDelete
  21. Trapstar's logo design is simple but iconic. That bold text on the classic tees and hoodies stands out without trying too hard. It’s instantly recognizable

    ReplyDelete
  22. One thing that’s frustrating is how fast everything sells out. I tried grabbing something from the Donda release and it was gone in minutes.

    ReplyDelete
  23. The detail in the God Speed Hoodie is what sets it apart. From the stitching to the printed graphics, everything feels premium.

    ReplyDelete
  24. I’ve noticed more people discovering Kapital lately, and I’m both excited and nervous. Part of me loves how underground it felt, but they deserve the recognition

    ReplyDelete
  25. I’ve noticed this hat trending a lot lately, and I can see why! It brings that effortlessly cool vibe without trying too hard. Also, it’s great how it works for all genders and ages, making it a truly inclusive fashion piece.

    ReplyDelete
  26. For anyone on the fence about getting a Trapstar hoodie — do it. The fit is unmatched. I was surprised by how well it sits on the shoulders and the length is just right.

    ReplyDelete
  27. Civil Regime isn’t just a clothing brand — it’s a lifestyle. It represents confidence, independence, and creativity. Whether it’s the bold hoodies, graphic tees, or statement jackets, everything

    ReplyDelete
  28. Throughout history, humanity has shown a deep desire to seek meaning, purpose, and power beyond the physical world. This longing has led to the worship of various gods and deities, both true and false. While faith can be a powerful force for good, there has also been the dangerous rise of fake gods — false idols, deceptive powers, or man-made constructs that demand loyalty and devotion but offer no real truth or salvation.

    ReplyDelete
  29. Lattafa has quickly risen to become synonymous with luxury, elegance, and affordability. Based in the United Arab Emirates, Lattafa Perfumes has carved a niche for itself by offering high-quality, long-lasting fragrances that rival some of the most expensive designer brands

    ReplyDelete
  30. G59 Records emerged from the underground scene, built on a foundation of anti-mainstream sentiments, mental health struggles, and raw emotion. $uicideboy$, the flagship artists of the label, drew in millions of listeners through their unfiltered lyrics and hard-hitting beats. Naturally, this raw authenticity spilled over into their merchandise.

    ReplyDelete
  31. Takashi Murakami, the acclaimed Japanese contemporary artist, has captivated the world not only with his vibrant, anime-inspired artworks but also with his foray into fashion. Known for blending traditional Japanese art techniques with bold pop culture imagery, Murakami has become a major force in the fashion world, pushing the boundaries of wearable art.

    ReplyDelete
  32. The Sp5der Store is now a go-to destination for fans of bold fashion statements, mixing high-end streetwear aesthetics with underground influence.

    ReplyDelete
  33. Eme Studios is its ambition to make fashion participatory: each release is often framed as a “drop” or capsule collection, with narratives that invite the wearer to interpret meaning.

    ReplyDelete
  34. Codeine-based syrups, often mixed with soda in a recreational cocktail known as “lean” or “purple drank,” are even more dangerous. Because codeine is an opioid, repeated use can lead to dependence, addiction, and potentially fatal respiratory depression. What begins as "an awful lot of cough syrup" can quickly spiral into a life-threatening habit.

    ReplyDelete
  35. . Among the most iconic and sought-after designs in the Chrome Hearts collection is the Chrome Hearts Cross—a motif that has become synonymous with the brand’s gothic and rock 'n' roll aesthetic.

    ReplyDelete
  36. In the modern streetwear scene, few brands have generated as much mystique and buzz as Corteiz (often stylized as CRTZ or misspelled as “Cortiez”). What began as a small, underground label has grown into a cultural phenomenon

    ReplyDelete
  37. In the rapidly evolving world of fashion, few brands have created as much buzz and loyal following in such a short span as Corteiz (often stylized as “Crtz”). Emerging from the streets of London, this underground label has grown into a cultural force, thanks to its authenticity, exclusivity, and a strong connection with youth culture.

    ReplyDelete
  38. Kanye West, a name synonymous with innovation and controversy in both music and fashion, has consistently pushed the boundaries of style. Among his many iconic fashion pieces, the Kanye West pullover has emerged as a quiet yet powerful symbol of modern streetwear.

    ReplyDelete
  39. Thanks for sharing sustainable fashion tips. Many people don’t realize that Denim Tears shorts are also crafted with thoughtful design and cultural storytelling. I recently found them discounted during the Christmas sale and the fit is honestly perfect. A strong option for anyone who values both fashion and meaning.

    ReplyDelete
  40. Love how you explained winter outfit layering! I’ve been using similar techniques with pieces from Le Lis Clothing. Their knit tops and dresses are perfect for holiday gatherings and casual cafes. The Christmas sale has made it even easier to stock up. Highly recommend browsing their current discounts.

    ReplyDelete
  41. This Christmas season, I’ve noticed a huge trend toward reps clothing in the streetwear community. People want premium style without spending too much, especially with holiday expenses everywhere. Reps brands are offering some really impressive quality now—soft fleece hoodies

    ReplyDelete
  42. I recently learned so much about how to eat a dragonfruit and it changed the way I enjoy tropical foods. Cutting it in half and scooping the flesh is the easiest method. The colors are festive and perfect for holiday smoothie bowls. If anyone wants tips, I highly recommend checking out how to eat a dragonfruit during the Christmas holidays sale.

    ReplyDelete
  43. The cultural symbolism stitched into denim tears hoodies is what made me a fan. They’re perfect for styling with cargos, joggers, or even simple jeans. Christmas holidays bring exclusive discounts that help you grab premium collections without overspending. Don’t miss the Denim Tears Hoodies Christmas Sale, it’s a great opportunity for collectors.

    ReplyDelete
  44. Thanks for sharing this! With Christmas Holidays coming, I’ve noticed Broken Planet trending a lot on social media. People love their bold streetwear designs, and I can see why.

    ReplyDelete
  45. Really informative article! As Christmas gets closer, online shopping saves me from the rush and long queues at malls. I’ve already found some great holiday deals on clothing and home décor items. The best thing is the comfort of ordering from home and getting everything delivered right to the doorstep.

    ReplyDelete
  46. Such a helpful read! If anyone is shopping winter apparel, Sisters and Seekers is running a great Christmas holidays sale. Their sweat sets and ribbed tops perform well for casual layering. I’ve bought a couple of their pieces before and they hold shape nicely. Give their deals a look—you’ll be surprised.

    ReplyDelete
  47. Pokémon hoodies are perfect for both casual streetwear and cozy home outfit vibes. I especially appreciate the oversized fit options. With the Christmas sale currently active, you can secure limited edition character designs at lower prices. The Pokémon hoodie collection is a great buy for fans and collectors.

    ReplyDelete
  48. As the Christmas holidays approach, people are looking for standout pieces, and I think Kapital Clothing is a brand worth mentioning. Their blend of traditional Japanese techniques and modern streetwear makes them perfect for festive events and winter layering.

    ReplyDelete
  49. Awesome content. With the holiday discounts everywhere, I’ve personally found 7 Heavens to stand out. The brand gives a premium feel at a budget-friendly price during the Christmas Sale period. Their collections are modern, durable, and ideal for winter outfits.

    ReplyDelete
  50. If you love warm, spicy, and woody scents, Lattafa is the brand to explore. Their Christmas holiday deals make niche-quality fragrances more accessible. I picked up a bottle for myself and another as a gift—both were well received!

    ReplyDelete
  51. Trapstar always brings something fresh for the Christmas season. Their festive-themed collections, especially the reflective hoodies and graphic tees, make awesome gifts for friends and family who love streetwear.

    ReplyDelete
  52. Nice article! I recently visited the Takashi Murakami Shop for Christmas gift ideas, and the collection was impressive. The mix of modern art and festive colors is perfect for people who love artistic merchandise. Definitely adding a few items to my holiday wishlist.

    ReplyDelete
  53. If you are thinking about winter style the chrome heart hoodie is worth a look The holiday sale offers amazing savings The logo and detailing stand out in every crowd

    ReplyDelete
  54. For anyone browsing for Christmas gifts, I highly recommend checking out Godspeed Clothing. Their holiday deals and stylish designs make them a strong pick for winter fashion. I got a couple of shirts recently and the quality is surprisingly good for the price. Definitely a brand to keep an eye on.

    ReplyDelete
  55. If durability matters, the Mr Winston hoodie is worth considering. The stitching and fabric weight feel solid, unlike cheaper brands that fade or stretch. With holiday discounts rolling in, now’s the perfect moment to try it. I’ve been wearing mine daily and it still looks brand new.

    ReplyDelete
  56. Śledzę blogi o modzie i często widzę porównania Stone Island do innych premium marek. Jednak różnica w jakości materiałów jest naprawdę odczuwalna. Podczas świątecznych promocji można kupić klasyczne modele w dużo lepszej cenie niż normalnie. Idealne dla osób, które chcą inwestować w ubrania na lata.

    ReplyDelete
  57. This blog gave me some great holiday fashion ideas. Speaking of trending brands, Corteiz Clothing is becoming super popular this season. Their outfits deliver both warmth and street style, ideal for Christmas hangouts. Highly recommend exploring their latest pieces!

    ReplyDelete
  58. For people who appreciate minimal fashion, the Essentials Hoodie is a winner. The neutral tones like taupe, cream, and charcoal fit perfectly with any streetwear look. Christmas sales are making it more affordable right now. Definitely a solid investment for comfortable winter wear.

    ReplyDelete
  59. Interesting post! As the Christmas holidays arrive, people are searching for something stylish yet comfortable. I recently came across Alchemai clothing, and the collection really impressed me. Their streetwear-style clothing is perfect for gifting and holiday parties.

    ReplyDelete
  60. If you need a hoodie that won’t peel or fade easily, try this one. The craftsmanship really holds up over time. While the Christmas holiday sale lasts, the Essentials Hoodie is well worth grabbing. Perfect combination of durability and comfort.

    ReplyDelete
  61. Just tried a Lattafa scent last week and I’m amazed at the projection and complexity. This brand rivals many designer fragrances at a fraction of the price. With Christmas approaching, their holiday sale is the perfect opportunity to explore new bottles. I suggest checking out the offers on Lattafa Perfumy Sale.

    ReplyDelete
  62. Super post! Marka Trapstar staje się coraz bardziej popularna w Polsce, szczególnie w okresie świątecznych zakupów. Warto sprawdzić ich najnowsze kolekcje, bo teraz można upolować świetne okazje i przygotować idealny outfit na świąteczne wyjścia.

    ReplyDelete
  63. I recently purchased an Eric Emanuel hoodie and the craftsmanship surprised me. The stitching is clean, and the fabric has a premium feel you don’t usually get from fast fashion brands. Their Christmas discounts make their pieces far more accessible. Don’t sleep on Eric Emanuel during the Holiday Sale.

    ReplyDelete
  64. Loved the insights you shared! One brand I think deserves more spotlight this Christmas is Asaali. Their latest drops are perfect for gifting and personal styling since they offer a mix of cozy winter wear and fashionable everyday pieces.

    ReplyDelete
  65. For those planning Christmas shopping early, the Pink Palm Puff Store has some great seasonal pieces worth exploring. Their winter wear blends comfort and aesthetic perfectly. Definitely a nice spot to grab holiday gifts!

    ReplyDelete
  66. Looking for the ultimate Christmas gift? Sisters and Seekers has you covered. Explore exclusive holiday promotions and seasonal specials. Treat yourself or loved ones this season.

    ReplyDelete
  67. Stay warm and festive with our exclusive Pokemon Hoodie collection. Enjoy comfort and style this winter. Limited holiday stock is available, so act fast.

    ReplyDelete