Filtered output disappears after browser back/forward

B

Brad

I created a base page class which sets a response filter and the filter
injects additional html into the response output stream. The filter works
fine and everything works as expected except for the following quirk:

When I navigate my browser to another url (a link in the page, a browser
favorite...it doesn't mater) and then use the browsers (IE 6) Back or
Forward buttons to go back to my filtered page the additional html I had
added using the filter is gone. I have to refresh the page from the server
to get back the additional filtered content.

Why would the filtered content "disappear"? It's in the page source that
was returned to the client so it shouldn't be any different than the reset
of the page the browser cached...should it?


Brad
 
S

Steven Cheng[MSFT]

Hi Brad,


Thank you for using Microsoft Newsgroup Sevice. Based on your description,
you have a custom page class that will output some filtering html to the
response stream. The page which inherits from the class runs well, the
filtering output can display. However, you found that if you navigator from
the page to other url and push the IE's "back" button to go back to the
former page, those filtering output disappear(also occurs when pushing the
"forward" button). Is my understanding of your problem correct?

If so, I'd like to know some more infos on your situation:
1. Does this problem occurs everytime or just sometimes?

2. Have you tried output some simple html code to the reponse stream and
see whether this problem occur?

3. Would you please show me some code about the output filtering html (just
simple enougth to reproduce the problem) if you
feel it convenient or possbile.

Please try out the above suggestion. If you have any questions or new
findings, please also let me know.


Merry Christmas!

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
B

Brad

Thanks for your response, Steven.

(1) Yes - this happens every time. I've view the source (Browser - view
source) when the page is initially rendered and it includes my added html.
After I go to another page then back/forward to that page and view the
source it is missing my additional content. Note: the page did not post
back to the server to refresh as a result of the forward/back, which I
double checked with debugging

(2) I was just adding simple html to the response stream....an html table
that makes up page header and some "menu" hyper links, which again all
displayed fine. So what would you want me to try instead of that?

(3) Writing from home as I prepare for a few days of vacation so I'll post
code mid-next week. Overall I'm setting a new response.filter in the base
page classes OnInit. In the overloaded filter stream's write method I
search for the <body> tag and add some html right after the <body> tag
i.e. responsestream = responsestream.replace(myBodyTag , myBodyTag &
extraHtml)

I'll check back and also send the exact code next week.

Thanks

Brad
 
S

Steven Cheng[MSFT]

Hi Brad,


Thanks for your response. I've got your situation and will keep waiting for
your update. In the meantime I'll do some further research on this issue.

Have a good vacation!

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
B

Brad

Steven,
Never mind. It seems to have been an issue with my browser caching a copy
of the page in IE's Offline Content. I'm not sure why this was so but once
I cleared the Offline Content the filter's inserted content always shows.

Thanks for your time.

Brad
 
S

Steven Cheng[MSFT]

Hi Brad,

Thanks for your response. I'm glad that the problem has been resolved. Have
a good day!


Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top