I've done hours of research but I can't seem to find an answer to a
very simple problem.
I have a catalog site where a user can upload an image for a certain
product. He/she edits the product by uploading a different image.
The problem is that the image is being cached and it doesn't get
refreshed unless a user manually refreshes his/her browser.
I've tried HTTP headers, Meta tags, htaccess and javascript. How are
you guys doing this? The text of the product (stored in a db) changes
but the image (stored in a directory) doesn't.
I've read of spoofing the url so it's different each time. I rather
not set no-cache to the entire page because it would slow down
searches. I just need the images to be refreshed. 4 2063
> I've read of spoofing the url so it's different each time. I rather not set no-cache to the entire page because it would slow down searches. I just need the images to be refreshed.
I can't remember where I heard this, but I seem to remember that if you add
a question mark to the end of the image source, the browser will not cache
it. ie.
<img src="item0001.j pg?" />
Can anyone else verify this?
Chris Finke
"Christophe r Finke" <ch***@efinke.c om> wrote in message
news:2l******** ****@uni-berlin.de... I've read of spoofing the url so it's different each time. I rather not set no-cache to the entire page because it would slow down searches. I just need the images to be refreshed. I can't remember where I heard this, but I seem to remember that if you
add a question mark to the end of the image source, the browser will not cache it. ie.
<img src="item0001.j pg?" />
Can anyone else verify this?
Chris Finke
I remember the same, but with a random number on the end
<img src="item0001.j pg?1234567890">
That way the browser sees a different number each time (well by law of
averages). You could use time ?hhmmss
Nel
Nel wrote: "Christophe r Finke" <ch***@efinke.c om> wrote in message news:2l******** ****@uni-berlin.de...
I've read of spoofing the url so it's different each time. I rather not set no-cache to the entire page because it would slow down searches. I just need the images to be refreshed.
I can't remember where I heard this, but I seem to remember that if you
add
a question mark to the end of the image source, the browser will not cache it. ie.
<img src="item0001.j pg?" />
Can anyone else verify this?
Chris Finke
I remember the same, but with a random number on the end
<img src="item0001.j pg?1234567890">
That way the browser sees a different number each time (well by law of averages). You could use time ?hhmmss
Nel
Better yet, with the webcam thing I made once, I used the time() to
create a number. That way it's different every time..
Thanks guys. Adding '?'.time() did the trick. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Conax |
last post by:
Hi there,
My boss is hoping that I can come up with a page that displays some
information. The information will always be displayed on specific part of
the page, with auto refresh. But he doesn't want the whole page to be
refreshed so that buttons and images around the information do not get
reloaded each time. Is this really possible?
Other pages on this site don't use frames, so this page can't use frams too.
Creating an ActiveX...
|
by: John Ramsden |
last post by:
In a monitoring app I have written, the message summary screen
refreshes itself automatically every couple of minutes via the
line <meta http-equiv="Refresh" content="180">.
The screen mostly comprises a table of single-line messages,
and next to each a small status image (red for error, yellow
for warning, etc).
Normally in Internet Explorer these images display fine. But
occasionally, after a refresh, the "missing image" cross and
|
by: Luna Kwok |
last post by:
Hello,
I have a very strange problem. When I load up a page, all the images
look fine, but when I refresh the page, all the images become dead.
This happens on both IE and netscape.
I have each image set up as
<a href="/<dirname>/<pagename>.html"><img
src="/<dirname>/<imagename>.gif" alt="<imagetext>" border=0 /></a>
|
by: Arnold |
last post by:
Hey there,
I've browsed for some fixes to this but only found a couple of similar
posts, which didn't solve my problem. I'm wondering how to refresh an
image control in a form after a user clicks a cmd button to open the
Windows API Common Dialog and selects a new file (jpeg). Images are
initially loaded in the form's oncurrent event. I've tried using
me.dirty = false to make the form current. Has anyone experienced
this before?
|
by: Selden McCabe |
last post by:
I have a page that displays a picture. In the page load I figure out which
image and then do a StudentPicutre.imageurl = <some file name>
But if you use the browser's back button, enter different criteria, then
click the view button, the code runs to load a different picture, but the
old one shows up until I hit the browser's refresh button.
What am I doing wrong? How do I force the browser to load the new image?
Thanks,
| |
by: Brad White |
last post by:
Overview:
I have a custom web app that has an 'Inbox' that refreshes every 30 seconds.
One user uses Outlook to host the web page.
Using IE, the refresh works fine. If the user is working in another window,
the
web page quietly refreshes in the background.
Hosted in Outlook, the refresh causes Outlook to come to the front on
every refresh. Or in XP, causes the toolbar icon to flash.
|
by: autospanker |
last post by:
Ladies and Gentleman,
I have been having this problem that has been driving me insane. I have a website that when viewed in Firefox first, the content in the body area is pushed down. Then when you click refresh, the content on that page is fine. I believe this could possibily a firefox issue. When I load the website in IE6 or IE7 the content is just fine. Any page you visit with IEXporer displays correctly where as if you go to the start...
|
by: Kaante |
last post by:
Hi,
I basically have two frames on my page, the top one contains users stats and the bottom frame contains the website.
I want to have a message icon on the top frame which would flash once the user gets a new message. Obviously I would have one message icon which doesn't flash and another which does.
Right now i refresh the top frame every 30 seconds so that the stats update. But is there an easier way to refresh? I mean right now the...
|
by: Kaante |
last post by:
Hi,
i want a frame on my website to display one pic if the user has new messages and another different pic if it dsnt. Before i used html to auto refresh page every 10 secs.
that was annoying for the user. as the user could notice the refresh and the images used to flicker.
i found out that AJAX could perfrom the refresh for me better hence i tried using that.
but the frame dsnt refresh automatically, but it does display correct info...
|
by: C. (http://symcbean.blogspot.com/) |
last post by:
Hi all,
I have an application which generates image graphs. These cache nicely
at the client, however if the user submits more data, I'd like to
force a reload of the image from the server.
I had a google, but all I could find were suggestions to use a varying
query in the URL. This is not a solution to my problem because if I
change the page to do that then ALL the graphs will be reloaded every
time.
|
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, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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,...
|
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...
|
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...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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();...
|
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...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |