473,382 Members | 1,726 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,382 software developers and data experts.

set Expires tag for images?

Hi - I want to reduce the download time of various pages by setting the
'Expires' tag for various images to a future date (this will then stop the
browser from re-requesting these for each new session).

I'm hosting on a commercial service so I don't have direct access to IIS
configuration. Is there anyway I can control this from my server-side code?

Thanks,

Paul.
Nov 19 '05 #1
3 3079
Paul W wrote:
Hi - I want to reduce the download time of various pages by setting
the 'Expires' tag for various images to a future date (this will then
stop the browser from re-requesting these for each new session).

I'm hosting on a commercial service so I don't have direct access to
IIS configuration. Is there anyway I can control this from my
server-side code?


Not if the images are served directly by IIS. Your ISP should be able
to change the server configuration to allow for caching.

BTW, you should prefer Cache-Control: max-age over Expires.

Cheers,
--
http://www.joergjooss.de
mailto:ne********@joergjooss.de
Nov 19 '05 #2
Currently the images ARE directly served by IIS. Can you point me to how
else I could do this so I can set the "Cache-Control: max-age"? Thanks,

Paul.
-----------
"Joerg Jooss" <ne********@joergjooss.de> wrote in message
news:xn***************@msnews.microsoft.com...
Paul W wrote:
Hi - I want to reduce the download time of various pages by setting
the 'Expires' tag for various images to a future date (this will then
stop the browser from re-requesting these for each new session).

I'm hosting on a commercial service so I don't have direct access to
IIS configuration. Is there anyway I can control this from my
server-side code?


Not if the images are served directly by IIS. Your ISP should be able
to change the server configuration to allow for caching.

BTW, you should prefer Cache-Control: max-age over Expires.

Cheers,
--
http://www.joergjooss.de
mailto:ne********@joergjooss.de

Nov 19 '05 #3
Paul W wrote:
Currently the images ARE directly served by IIS. Can you point me to
how else I could do this so I can set the "Cache-Control: max-age"?
Thanks,


You could implemment a HttpHandler that serves your images, but this is
really a waste of time. Ask your service provider to change your IIS
configuration.

Cheers,
--
http://www.joergjooss.de
mailto:ne********@joergjooss.de
Nov 19 '05 #4

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

Similar topics

9
by: | last post by:
When I complete a <FORM METHOD=POST> and I press <INPUT TYPE=SUBMIT> a new page was arrive. Then, if I press browser back button it says that: "page has expired". Why??? Can I fix it or it is...
3
by: Steven | last post by:
Hi there, I have a database with documents that have event dates included. What I need to do is have the Expires META tag to be one day after that event date. Can I get the date from the...
3
by: techie | last post by:
I am using the following to delete the contents of a cookie Response.Cookies("maincookie").expires = DateAdd("d",-2,now) Response.redirect "login.asp" If i try to alert the value of the cookie...
2
by: Alex Kail | last post by:
I have a site that you can only gain access to if you are logged in. My sign in screen asks for your email address and password. If all checks out, I write out information to a cookie (Cookie 1). ...
1
by: Chad Richardson | last post by:
I have several users data elements that I want to maintain and persist. I've created a cookie with keys to do this, but having problems with it persisting. 1. Do you set the .Expires at the...
2
by: Promenade | last post by:
Hi, everyone... I want to avoid the user to use the navigator back button. For that reason, I tried all the possible ways to set the Expires property of the Response Object, but whatever I do, it...
2
by: WALDO | last post by:
I am having the exact same problem. I am using VS2008 (.Net 3.5) and I can't set the Expires date out any further than one day. Doing a little reflection, I see that in the HttpCachePolicy class,...
2
by: henryrhenryr | last post by:
I am trying to make my php-generated images cache. Here is a summary of the script with the headers. It doesn't seem to cache though. Do I need to do something special to make sure it caches? ...
2
by: helveticus | last post by:
I'm having difficulties setting the expires header for images and css files in my compression HttpModule. Compression is carried out by context_BeginRequest and works fine (code not shown)....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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:
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.