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

  • Home
  • SEARCH
  • 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 6868129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:23:46+00:00 2026-05-27T03:23:46+00:00

I am using the web.py framework to set up my website. When I click

  • 0

I am using the web.py framework to set up my website. When I click a button, I want to POST data to the server and then send back data via a generator function / yield. Basically yield data as it’s ready, not wait for my data function to fully finish.

I get yield to work via GET, but my POST implementations via AJAX is the problem.

def POST(self):
    web.header('Content-type','text/html')
    web.header('Transfer-Encoding','chunked')
    yield "hello"
    sleep(10)
    yield "hello"

And my javascript:

<script type="text/javascript">
    jQuery(document).ready(function() {
        jQuery("#button").click(function() {
            jQuery.ajax({
                  type: "POST",
                  dataType: "text",
                  cache: false,
                  success: function(data){
                    jQuery("#container").html(data)
                  }
                }); }); });
</script>

Output:

HelloHello (after 10 seconds) 
rather than..
Hello (10 second delay) Hello

Note: I am using web.py’s built in server on my local machine.

  • 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-27T03:23:46+00:00Added an answer on May 27, 2026 at 3:23 am

    Foolish me – AJAX doesn’t support streaming. So this is a case when Comet or HTML5 WebSockets will come in handy.

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

Sidebar

Related Questions

I want to write a simple web framework myself using WSGI, Python. I am
I have a web application using the .Net 2.0 framework. The whole website is
This is using the web app framework, not Django. The following template code is
I have this web application using Spring Web Flow framework. In my main page
I'm a python newbie and starting out with using the Bottle web framework on
I'm writing a web application using the Catalyst framework . I'm also using a
We are developing a web application using Spring framework and Hibernate ORM. As far
I'm building a MVC web application (using the Spring MVC framework), and I'm a
Im currently using vs2008 with asp.net mvc framework for web development. Im missing a
I am designing a web application using the ASP.net MVC framework. I would like

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.