guys any way to READ the buffer?<br><br>Response.Clear to clear it<br>Response.Flush to send it to client..<br><br>but how in the world to read it?<br><br>maybe 3rd party ASP component?<br><br>
The buffer isnt intended to be read, its more or less at the top of your page you say<br><br>Response.Buffer = True, one of the main reasons for doing this is, that if something happens during the processing of the page, and you need to redirect to an error page, or perhaps you dont want to show the processing ASP at all.<br><br>if you were to try Response.redirect and you've already sent data back to the client, the page would generate a runtime error. you need to buffer for some reasons, such as being able to redirect without a problem, waiting on large quanities of data to load, but not show it spitting back in peices. etc. The buffer <b>is the page</b>. <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href=
Yes, I have Response.Buffer = true at top of them page, so the date is not sent to client. <br><br>And the thing I am trying to do is page caching, for example I have table in page that takes 6 sec to render. So I was thinking of reading that rendered table from buffer and store it somewhere. THen I won't have to render it again.<br><br>One of the ways to do is just to store HTML in a str variable.. like insted of <br><br><%<br>Put mark in buffer<br>%><br><table name=tobecached><br><tr><td></td></tr><br></table><br><%<br>Cach the buffer<br>%><br><br>I will need to do<br><br><%<br>strCache ="<table name=tobecached>" _<br>& "<tr><td></td></tr>"<br>& "</table>"<br>cache the strCache<br>%><br><br>it's ok for small chunks of code.. but there is no need to cache sall chunks <br><br>so I sould prefer to read the rendered code from buffer..<br><br><br>
um, if it hasnt occured to you, if the webbrowser has cache enabled anyways, it's going to use it's already rendered HTML thats in it's cache folder. <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href=
I can't rely on browsers cache. Only part of the page I am creating neeeds to be cached, the rest is dynamic.<br><br>For example, I have a page with date on it.. I need all but date to be cached.<br><br>
well save that portion as a string <br><br>HtmlStr = "<BR...." & somevar & "...>"<br><br>and use response.write to spit it back in the section you want. <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href=
what about that porion is like 100 lines a mix of ASP and HTML in it, lie looping through recordsets<br><br>for example<br><table><br><%<br>while not ors.eof<br> %><br> <tr><br> <td><br> <font color="<%=ors("color"%>"><br> ors("name"<br> </font><br> </td><br> <td><br> <font color="<%=ors("color"%>"><br> ors("make"<br> </font><br> </td><br> </tr><br> <%<br> ors.movenext<br>wend<br>%><br></table><br><br>and so on, imagine a code 10x bigger and mroe complicated than this... it will be a pain to stick it in variable.. possible but painful... but I might need to do it.. 'cause I can't read the rendered text... I wish I can do something like<br><br><%strTemp = "%>fhdkjhkjfhk, <%=intVar%> html code <%"%><br>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.