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 / General / February 2008

Tip: Looking for answers? Try searching our database.

cookieless session, "~" operator and client-side cashing problems

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tomasz J - 16 Feb 2008 12:31 GMT
Hello developers,

My custom control allows for specifying paths to images it uses.
In those paths I want to be able to use the "~" app root operator, so my app
works correctly with virtual paths.

So, rendering the control I have to convert the "~" app-rooted paths to a
website-rooted paths using WebControl.ResolveUrl() or a similar method.

And here is the problem:
If cookieless sessions are used, paths resolved in such way include session
ids, like (S(prfybe55sw30b155y4w22pfp) as a part of the client-visible path.
As a result client browser is unable to effectively cache images - every
time new session is created images are being downloaded over and over
again - because their observed paths change.

I think the best solution is to convert the "~" app-rooted path to a
website-rooted path, but without the session id part. Are there any
simple/standard solutions, besides resorting to Regex?

Thanks for any hints and/or comments,

Tomasz
Steven Cheng - 18 Feb 2008 00:49 GMT
Hi Tomasz,

As for the Session State, if you're using cookieless mode, the id is
necessary and url is the only place we can hold it. Yes, you're right that
the client caching may be affected due to the changable sessionID. However,
as long as the user session not expire, the sessionID should remain the
same value and the page will be cached at client-side during that period.

For the following things you mentioned:

===========
I think the best solution is to convert the "~" app-rooted path to a
website-rooted path, but without the session id part. Are there any
simple/standard solutions, besides resorting to Regex?
==============

what's the exact problem you want to address by converting the "~" path? As
far as I know, all the server-side controls(markup) can interpret this path
correctly. For website based path, if your application's physical path(from
site root) will not quite change, you can use "/xxxx" like path which is
based from IIS site.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================
   

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
>From: "Tomasz J" <oegweb@nospam.nospam>
>Subject: cookieless session, "~" operator and client-side cashing problems
>Date: Sat, 16 Feb 2008 13:31:06 +0100

>Hello developers,
>
[quoted text clipped - 19 lines]
>
>Tomasz

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.