Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 639429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:50:30+00:00 2026-05-13T20:50:30+00:00

I’m trying to understand REST. Under REST a GET must not trigger something transactional

  • 0

I’m trying to understand REST. Under REST a GET must not trigger something transactional on the server (this is a definition everybody agrees upon, it is fundamental to REST).

So imagine you’ve got a website like stackoverflow.com (I say like so if I got the underlying details of SO wrong it doesn’t change anything to my question), where everytime someone reads a question, using a GET, there’s also some display showing “This question has been read 256 times”.

Now someone else reads that question. The counter now is at 257. The GET is transactional because the number of views got incremented and is now incremented again. The “number of views” is incremented in the DB, there’s no arguing about that (for example on SO the number of time any question has been viewed is always displayed).

So, is a REST GET fundamentally incompatible with any kind of “number of views” like functionality in a website?

So should it want to be “RESTFUL”, should the SO main page either stop display plain HTML links that are accessed using GETs or stop displaying the “this question has been viewed x times”?

Because incrementing a counter in a DB is transactional and hence “unrestful”?

EDIT just so that people Googling this can get some pointers:

From http://www.xfront.com/REST-Web-Services.html :

4. All resources accessible via HTTP GET should be side-effect free. That is, the request should just return a representation of the resource. Invoking the resource should not result in modifying the resource.

Now to me if the representation contains the “number of views”, it is part of the resource [and in SO the “number of views” a question has is a very important information] and accessing it definitely modifies the resource.

This is in sharp contrast with, say, a true RESTFUL HTTP GET like the one you can make on an Amazon S3 resource, where your GET is guaranteed not to modify the resource you get back.

But then I’m still very confused.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T20:50:30+00:00Added an answer on May 13, 2026 at 8:50 pm

    What matters is that from a client point of view GET is safe (has no side effects) by definition and that a client therefore can safely call GET any number of times without considering any side effect that might have.

    What a server does is the server’s responsibility. In the case of the view counter the server has to make the decision if it considers the update of the counter a side effect. Usually it won’t because the counter is part of the semantic of the resource in the first place.

    However, the server might decide NOT to increment the counter for certain requests, such as a GET by a crawler.

    Jan

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 319k
  • Answers 319k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer If one of your tables has an odd number of… May 14, 2026 at 12:13 am
  • Editorial Team
    Editorial Team added an answer You keep pointers to both connections in the delegate, and… May 14, 2026 at 12:13 am
  • Editorial Team
    Editorial Team added an answer Seems to have been a mismatch between the built dataset… May 14, 2026 at 12:13 am

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I want use html5's new tag to play a wav file (currently only supported
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I've got a string that has curly quotes in it. I'd like to replace
In order to apply a triggered animation to all ToolTip s in my app,

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.