473,804 Members | 3,031 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why IE refuse to cache redirected image?

Is there anyway to get IE to cache a redirected image? For example, I have
an page with the following:

<html><body>
<img src=http://site1.com/redir.php?id=12 >
</body></html>

The image is redirected to a different location through a script. If I don't
redirect and just point to the final image, IE caches the image properly.
Why is Internet Explorer not caching my image? Mozilla and Opera works
correctly. See the headers below
(today's date is Oct 5).
+++GET 1+++
GET /redir.php?id=12 HTTP/1.1
Accept: */*
Referer: http://site1.com/
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR
1.0.3705; .NET CLR 1.1.4322)
Host: site1.com
Connection: keep-alive
+++RESP 1+++
HTTP/1.1 302 Found
Date: Tue, 05 Oct 2004 18:06:46 GMT
Server: Apache
Accept-Ranges: bytes
Location: http://site2.com/real.php?id=12
Content-Encoding: gzip
Cache-Control: max-age=86400
Expires: Wed, 06 Oct 2004 18:06:46 GMT
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8
+++GET 2+++
GET /real.php?id=12 HTTP/1.1
Accept: */*
Referer: http://site1.com/
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR
1.0.3705; .NET CLR 1.1.4322)
Host: site2.com
Connection: keep-alive
+++RESP 2+++
HTTP/1.1 200 OK
Date: Tue, 05 Oct 2004 18:10:35 GMT
Server: Apache
Accept-Ranges: bytes
Cache-Control: max-age=604800, s-maxage=604800
Expires: Tue, 12 Oct 2004 18:10:35 GMT
Content-Length: 3234
Connection: close
Content-Type: image/jpeg

Jul 17 '05 #1
1 4293
Samuel wrote:
Is there anyway to get IE to cache a redirected image? For example, I have
an page with the following:


Browsers shouldn't cache negotiated content. What they should do if an
'expires' header is sent....? Solution would be to full the browser into
thinking it's not negotiated content by embedding the parameters in the
path and using mod_rewrite or a custom 404 handler to convert back to the
real php script + parameters.

HTH

C.
Jul 17 '05 #2

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

Similar topics

3
2195
by: John Pastrovick | last post by:
I mean any kind, browser, server..., ANY. I have a script that erases and adds thumbs and the cache is a nightmare. There is an XP folder tool options to enable thumbs cache. I want to disable it (and any other type) regardless of this option status. Thanks.
2
2602
by: Дамјан Георгиевски | last post by:
I'm looking for a way to cache some modified images as files (in a python program ofcourse). The scenario would look like this: getmodifiedimage(filename): is it in cache? is the cache up to date (not older than file) if not, modify filename and store in cache (keyed by filename + modification) return modified image
1
2791
by: Jack | last post by:
Is it possible to find out what the tablespace definitions are of database you are about to build using a redirected restore? What I am wanting to do is build a script that can take only a backup file of a database and do a redirected restore into another database. This means I may not know or have access to the database where the backup originated at. It seems like once you start the redirected restore there is no way to do a list...
2
4091
by: Nadav | last post by:
Hi, I am new to WebControls, I have created a WebControl that is used to present an image, the image bing presented is created on runtime, each client side button click causes the image to change, this require to prevent this image from being cached, I have tried to play around with: Context.Response.AddHeader("Cache-Control", ... ) and with Context.Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache) BUT Still, the...
5
1211
by: Kruno | last post by:
Hi ! My problem is : I have a link on my secure part of web site with which user can signout... Along with that below link is users name under which user signs in.. When user presses that link he is redirected to default starting page and on the way I call the Session.RemoveAll, FormsAuthentication.Signout... But If I press BACK button on browser he is redirected to secure
2
2242
by: thehuby | last post by:
I am building a CMS and as part of it a user can upload an image. Once uploaded I am displaying the image. If the user then decides they want to replace the image with another I get a caching issue in the browser as the image has the same name. Without having to use unique file names each time the user replaces an image, how can I force the browser to check for the file properly?
2
2683
by: moondaddy | last post by:
I had to repost this because I had to update and change my msdn alias. I will re-ask the question and clarify a few things that were not clear before. This code is all executed on my dev machine running winXP sp2 and VS2005. I'm using a c# 2.0 winforms app which talks to a c#2.0 asp.net app that also contains 1 web service. Note: the webpage and web service are located side by side in the same web app.
3
4018
by: wardemon | last post by:
Hi All, I have a aspx page named: ImageProcess.aspx that creates a thumbnail version of an image by passing the ImagePath, width, and height. The ImagePath is taken from a table from a database, while width and height is user specific - meaning user can change this on demand. My question is, although this rendering images on the fly is cool, I would like to implement some sort of mechanism/logic that it wont keep rendering the thumbnail...
4
2283
by: =?Utf-8?B?TWlrZQ==?= | last post by:
Hi. I'm building an ASP.NET 2.0 web-app for a customer. The customer wants a background image that's 124k in size as the background for each page. I've recommended they use a smaller-size image, but the customer is absolutely adamant about using the image. I'm afraid that this large image will degrade performance if it's loaded for each page. Can I somehow use ASP.NET caching to cache the background image so it doesn't have to...
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9579
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10571
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10326
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10317
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6851
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5520
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4295
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2990
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.