Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Caching / July 2005

Tip: Looking for answers? Try searching our database.

How to avoid repeated downloading of .xsl files?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rahul Agarwal - 29 Jun 2005 02:04 GMT
Hi

We are heavily using .xsl for client-side transformation and these files are
always downloaded with every request to a page. Is it possible to some how
cache these files on the client side like any other files (for e.g. .js,
.img files)  so that it dosent gets downloaded everytime.

Please advise
Rahul
Joerg Jooss - 01 Jul 2005 08:47 GMT
> Hi
>
[quoted text clipped - 3 lines]
> other files (for e.g. .js, .img files)  so that it dosent gets
> downloaded everytime.

Sure. Simply mark the files as cacheable in your web server using
appropriate HTTP caching headers, e.g.

Cache-Control: public, max-age=86400

(any cache may store the XSL and consider it fresh for 86400 seconds,
i.e. one day)

Note that in IIS you can only set headers per directory, in which case
you'll need to put all your XSL files in a common directory and set the
desired HTTP headers for this directory.

Cheers,
Signature

http://www.joergjooss.de
mailto:news-reply@joergjooss.de

Rahul Agarwal - 04 Jul 2005 01:09 GMT
Hi Joerg

Thanks for the reply. However I am still unable to cache the .xsl files even
after adding the header you suggested. I think the problem is IIS is sending
a header "Pragma: no-cache", do you know how I can remove this header. I
can't seem to find this header being explicitly added on the .xsl
files/directory.

Please advice
Thanks
rahul

>> Hi
>>
[quoted text clipped - 17 lines]
>
> Cheers,
Joerg Jooss - 04 Jul 2005 20:50 GMT
> Hi Joerg
>
[quoted text clipped - 3 lines]
> remove this header. I can't seem to find this header being explicitly
> added on the .xsl files/directory.

Are you sure it's set by IIS? I don't think so. Also note that Pragma:
no-cache is a meaningless for properly implemented HTTP 1.1 clients.

Cheers,
Signature

http://www.joergjooss.de
mailto:news-reply@joergjooss.de


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.