473,385 Members | 1,587 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Reponse.write problem?

Hello,

I'm dynamically writing out a web page using response.write. The page has
images and hyperlinks (each hyperlink points back to the same page, but with
a different parameter which specifies a larger image that is loaded). When
I first bring up the page everything is fine. Then when I click on the
hyperlinks, the page reloads but has the exact same images. The only way to
view the new images is to hit 'REFRESH'. Is there something I am missing,
some way to clear the html contents before loading the page back up?
Nov 16 '05 #1
4 3217
Check whether your entire URL (to any resource: page or image) is really
different.
If its not, check whether the page expires immediately.

- Joris

"Richard" <ab*******@mindspring.com> wrote in message
news:ew**************@TK2MSFTNGP10.phx.gbl...
Hello,

I'm dynamically writing out a web page using response.write. The page has
images and hyperlinks (each hyperlink points back to the same page, but with a different parameter which specifies a larger image that is loaded). When I first bring up the page everything is fine. Then when I click on the
hyperlinks, the page reloads but has the exact same images. The only way to view the new images is to hit 'REFRESH'. Is there something I am missing,
some way to clear the html contents before loading the page back up?

Nov 16 '05 #2
Thanks for your response! The URL is different, and I've tried setting
Response.ExpiresAbsolute = System.DateTime.Now.AddSeconds(5), but that
doesn't work either. Also I've noticed, it looks like the new page is
loading up, but the previous page also loads on top of it, making it look
like there's no new page. Is there some way to just clear this out (I've
tried response.clear() but no luck).

Thanks!

"Joris Dobbelsteen" <RE********************@jAoris2k.aTth.cXx> wrote in
message news:41***********************@news.wanadoo.nl...
Check whether your entire URL (to any resource: page or image) is really
different.
If its not, check whether the page expires immediately.

- Joris

"Richard" <ab*******@mindspring.com> wrote in message
news:ew**************@TK2MSFTNGP10.phx.gbl...
Hello,

I'm dynamically writing out a web page using response.write. The page has images and hyperlinks (each hyperlink points back to the same page, but with
a different parameter which specifies a larger image that is loaded).

When
I first bring up the page everything is fine. Then when I click on the
hyperlinks, the page reloads but has the exact same images. The only way to
view the new images is to hit 'REFRESH'. Is there something I am

missing, some way to clear the html contents before loading the page back up?


Nov 16 '05 #3
"Richard" <ab*******@mindspring.com> wrote in message
news:uN**************@TK2MSFTNGP11.phx.gbl...
Thanks for your response! The URL is different,
Thats indeed correct, are you sure the image refered to is different too?
and I've tried setting
Response.ExpiresAbsolute = System.DateTime.Now.AddSeconds(5), but that
If you don't want caching:
Response.Caching.SetCachability(HttpCachability.No Cache)

This ensures the response is never cached (including server, proxies and
clients).

Dont use Reponse.Expires / ExpiresAbsolute, these are predicated in ASP.NET.
Use Reponse.Caching.SetExpires(System.DateTime.Now.Add Seconds(5));
Always use Reponse.Caching.<whatever> if it involves caching.
doesn't work either. Also I've noticed, it looks like the new page is
loading up, but the previous page also loads on top of it, making it look
like there's no new page. Is there some way to just clear this out (I've
tried response.clear() but no luck).
Response.Clear() works only when buffering is enabled.
You can ensure this in the <@ ... > line (first on on the page).

You might want to consider posting the (relevant) source up here...
Thanks!

<snip>

- Joris
Nov 16 '05 #4
Joris Dobbelsteen wrote:
"Richard" <ab*******@mindspring.com> wrote in message
news:uN**************@TK2MSFTNGP11.phx.gbl...
Thanks for your response! The URL is different,


Thats indeed correct, are you sure the image refered to is different
too?
and I've tried setting
Response.ExpiresAbsolute = System.DateTime.Now.AddSeconds(5), but
that


If you don't want caching:
Response.Caching.SetCachability(HttpCachability.No Cache)

This ensures the response is never cached (including server, proxies
and clients).


No. A client does not need to adhere to Cache-Control headers, since a
browser history is not meant to behave like a cache -- the fact that many
browsers do is misleading.

Quoting section 13.13 of the HTTP 1.1 spec:

"History mechanisms and caches are different. In particular history
mechanisms SHOULD NOT try to show a semantically transparent view of the
current state of a resource. Rather, a history mechanism is meant to show
exactly what the user saw at the time when the resource was retrieved."
Cheers,
--
Joerg Jooss
jo*********@gmx.net

Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Jack | last post by:
Hi, I have the following piece of code:If RS.EOF or RS.BOF Then Session("Authenticated") = False Response.Write "Sorry, your userid or password did not match" Response.Write "<BR>"...
1
by: Simon Prince | last post by:
Hi I have an classic ASP page that contains nothing else but the following code... <%@ Language=VBScript %> <% Response.clear Response.redirect("/Intranet") %>
1
by: JIM.H. | last post by:
Hello, In my login screen I validate user against SQL table and call my main page with Reponse.Redirect("myPage.aspx"); I see my application comes there but does not switch to myPage.aspx, I used...
3
by: Naeem Sarfraz | last post by:
Is there a way to view the xml sent to a .net web service from a .net client? Can I intercept the xml in any way? I want to be able to view the xml that I send, is this possible? Thanks in...
3
by: Fredrik | last post by:
I want to generate a pdf file of "the current page". It is a ASP.NET aspx file created partly from GET parameters, but most often using the ASP.NET event model (i.e. clicking buttons etc). One...
1
by: Samuel Shulman | last post by:
Hi I am looking for a way to send a POST request using the Reponse.Redirect or any thing similar Thank you, Samuel
8
by: anukedari | last post by:
Hi, Could any boby please help to get the answers for the following questions: Is Apache always sends "X-Cache:MISS" header even when caching is off (disable)? or Can we say that cache...
0
by: djtodd | last post by:
Is there any way to use reponse.redirect and provide network credentials for basic auth along with it to prevent the nt security dialog box when hitting the new server location? or, is there another...
1
by: jmk | last post by:
I'm trying to use an external SMS-service through .NET Framework 1.1 and using the webClient.DownloadData(strMessage) method. The strMessage is a string consisting the parameters to send a message,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.