Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Caching images & ASP pages

1 view
Skip to first unread message

CJM

unread,
Jun 23, 2004, 6:36:46 AM6/23/04
to
I've had some periodic problems on certain (intranet)servers where IIS seems
to be caching thing in an unexpected way, or is server cached pages where
new content is expected.

The first situation is where we have a standard Top + Left + Content
framset; the left frame contains a menu which shows standard options - when
the user logs in, extra menu options are available to them, depending on
their priveleges. The menu is generated from a DB in ASP, and when the user
logs in, Javascript is used to reload the page in the left frame - eg.
re-generate menu based on logged-in user.

This used to work on all servers, but at some point in time I found that
people were logging in but were stuck with the standard menu. If we
right-clicked in the menu and chose refresh, often the correct (eg expanded)
menu would be shown.

I'm not sure where the problem is IIS or could be controlled in ASP...

The second problem is on my development machine; when I browse to my
development copy of the intranet, I dont get the icons for each menu item.
However, when I browse to the live Intranet system, the correct graphics are
shown.

Screenshots:
My machine - http://www.brightnorth.com/news/menu1.gif
Normal site - http://www.brightnorth.com/news/menu2.gif

I'm assuming that this one is purely an IIS problem. Any thoughts?


Aaron [SQL Server MVP]

unread,
Jun 23, 2004, 9:16:27 AM6/23/04
to
Some info here:
http://www.aspfaq.com/2022

--
http://www.aspfaq.com/
(Reverse address to reply.)


"CJM" <cjmn...@newsgroups.nospam> wrote in message
news:Oscx73QW...@TK2MSFTNGP12.phx.gbl...

StephenMcC

unread,
Jun 23, 2004, 10:32:02 AM6/23/04
to
Hi CJM,

I've used frames many times, they can seem like a good idea at the time, but sooner or later they can become a bit of a pain, difficult to maintain and odd performance in certain browsers etc. Sometimes it's eaiser to generate all content on a single pages espiceally when it comes to problems with cacheing mentioned. But if u really wanna use these you could have a different frameset for public/private users rather than trying to update a single frameset accordingly!

To ensure that IIS serves the latest version of the page each time it might be useful to add header info to ur ASP pages (if ur not already doing so), ie:

Response.Addheader "cache-control", "private"
Response.Addheader "pragma", "no-cache"
Response.ExpiresAbsolute = #January 1, 1990 00:00:01#
Response.Expires=-1

There seems to be so much goin on there to be sure where ur caching problems lie, client script (if any), the frameset, the ASP's or IIS/Web Site Configuration - u need to do a bit of digging!!

Good luck!

Stephen
.

CJM

unread,
Jun 23, 2004, 11:03:57 AM6/23/04
to
Aaron/Stephen,

Thanks. I'd actually already discovered this info while waiting (on Aaron's
site of course!)

Clearly this stops the ASP menu caching problem but not the menu icons....
Any ideas about these?

Chris

Aaron [SQL Server MVP]

unread,
Jun 23, 2004, 11:35:47 AM6/23/04
to
> Clearly this stops the ASP menu caching problem but not the menu icons....
> Any ideas about these?

How often are you changing the menu icons, really? If you change the
graphics, change the name too. Then the browser won't look at the old
images still in the cache.

A


CJM

unread,
Jun 23, 2004, 12:12:30 PM6/23/04
to
"Aaron [SQL Server MVP]" <ten...@dnartreb.noraa> wrote in message
news:%23GtwmfT...@TK2MSFTNGP10.phx.gbl...
The images never change. Well, they havent so far...

It's not like it's picking up old graphics... it's presumably picking up the
right graphics but not showing them... that is, the images appear to take up
space, but just arent visible...!

The images are each surrounded by an anchor, since they are also used within
the javascript menu top expand each menu group - this functionality still
works...

it's puzzling!

Chris


Aaron [SQL Server MVP]

unread,
Jun 23, 2004, 1:24:25 PM6/23/04
to
> The images never change. Well, they havent so far...
>
> It's not like it's picking up old graphics... it's presumably picking up
the
> right graphics but not showing them... that is, the images appear to take
up
> space, but just arent visible...!

? So why do you think this is a caching issue?

A


WenJun Zhang[msft]

unread,
Jun 24, 2004, 2:32:58 AM6/24/04
to
Chris,

I wonder if simply cleaning up Internet temporary files in IE can
help. Also checking those imges' IIS log records on your development
machine should be helpful to further narrow down. I assume there are
3 possibilities:

1) There are no records of those images. Means somehow the image
requests are actually not send by IE and recieved by IIS.

2) The image records' return code is 304 - Not Modified. Means IE
loads the images from its internet temp folder other than IIS.

3) The image records' return code is 200 - Ok. Means just as your
assumed, the images are actually delivered by IIS but IE doesn't
dispaly them correctly.

Best regards,

WenJun Zhang
Microsoft Online Support
This posting is provided "AS IS" with no warranties, and confers no
rights.
Get Secure! - www.microsoft.com/security

WenJun Zhang[msft]

unread,
Jun 27, 2004, 9:50:54 PM6/27/04
to
Hello Chris,

Just want to check if the issue has been resolved. If it still
persists, please don't hesitate to let me know. I'll continue to
assist you on the troubleshooting. Thanks.

CJM

unread,
Jun 28, 2004, 4:22:09 AM6/28/04
to
WenJun,

Yes this issue is still live. I've been talking to Luke [MSFT] on the
asp.general group...

Chris

""WenJun Zhang[msft]"" <v-wz...@online.microsoft.com> wrote in message
news:oUffeJLX...@cpmsftngxa10.phx.gbl...

CJM

unread,
Jun 28, 2004, 6:36:10 AM6/28/04
to
Got the problem sorted now. I re-checked the logs and the two images
concerned were coming up as 404's - there was a small typo in the code! I
didnt notice before because the images are part of a large group that all
were coming up as 200 - didnt notice the 2 x 404 in the middle.

Apologies and thanks for your help.


WenJun Zhang[msft]

unread,
Jun 28, 2004, 8:25:35 AM6/28/04
to
Chris,
Glad to hear you've resolved the problem. :)
0 new messages