473,325 Members | 2,308 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,325 software developers and data experts.

Specifying 'Expires' header for JS file

VP
I would like to specify 'Expires' header for a js file. Can you please let
me know where & how to specify that.

Thanks.
Nov 19 '05 #1
3 6636
try comp.lang.javascript
the javascript experts hang out there.

tim
--------------------------
blog: http://tim.mackey.ie
"VP" <ju**@junk.com> wrote in message
news:%2******************@TK2MSFTNGP14.phx.gbl...
I would like to specify 'Expires' header for a js file. Can you please let
me know where & how to specify that.

Thanks.

Nov 19 '05 #2
to control .js (or any file) headers in .net, just changing the mapping in
iis to map *.js to the asp.net, then you can just add server code to set the
expires header to what you want.

-- bruce (sqlwork.com)

"VP" <ju**@junk.com> wrote in message
news:%2******************@TK2MSFTNGP14.phx.gbl...
I would like to specify 'Expires' header for a js file. Can you please let
me know where & how to specify that.

Thanks.

Nov 19 '05 #3
VP wrote:
I would like to specify 'Expires' header for a js file. Can you
please let me know where & how to specify that.

Thanks.


You can do this using the IIS admin plugin in MMC. I can't provide you
the exact button names to click since I'm running a German WinXP, but
it should work like this:

1. Put your JS file(s) in a separate subfolder within your web
application

2. In the treeview in the IIS MMC plugin, choose Properties from this
subdirectory's context menu

3. Select the HTTP headers tab

4. Under "User-defined headers", add Cache-Control: no-cache or
whatever caching header you like to use

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

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...
2
by: prakash | last post by:
Hi All Can anyone explain the difference between Response.Expires & Session.Timeout Regards Prakash
3
by: Gordon Watts | last post by:
Hi there, I've got a special header file which I run an small external program over to produce a .cpp file that I want to have my project build. The special header file includes a second header...
8
by: John Dalberg | last post by:
What happens when a cookie expires? Does it mean that when the browser or sessions ends, it doesn't get saved? I am using Opera and looking at available cookies and I can some cookies that have...
5
by: News KF | last post by:
Hi, I'm new to cahce control, so I hope my question makes sense. let's assume a small php file like <html><body> <?php
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...
1
by: Tine Müller | last post by:
// Date in the past header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // always modified header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // HTTP/1.1 header("Cache-Control:...
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)....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.