473,399 Members | 3,888 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,399 software developers and data experts.

User Graphic Suggestions

The Website I'm developing allows some users to upload a custom header
image, which is seen by that user and all users signed up by that user.

I'm trying to decide the most efficient way to handle this. I don't want to
hit the database to get the image every time I render a page, and I don't
think I want an image stored in memory for every user online. Caching just
doesn't seem useful here as each user online could potentially be seeing a
different image.

One thought I'm having is to actually store the image in a file folder with
a name that matches the user's ID, and then I could just reference that
image from my HTML.

I'd be curious to see if anyone else had some ideas on this.

Thanks.

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com

Jan 8 '08 #1
2 915
"Jonathan Wood" <jw***@softcircuits.comwrote in message
news:uP**************@TK2MSFTNGP06.phx.gbl...
The Website I'm developing allows some users to upload a custom header
image, which is seen by that user and all users signed up by that user.

I'm trying to decide the most efficient way to handle this. I don't want
to hit the database to get the image every time I render a page, and I
don't think I want an image stored in memory for every user online.
Caching just doesn't seem useful here as each user online could
potentially be seeing a different image.

One thought I'm having is to actually store the image in a file folder
with a name that matches the user's ID, and then I could just reference
that image from my HTML.

I'd be curious to see if anyone else had some ideas on this.
Assuming that the individual images are going to be the same size or very
nearly, I'd probably do the following:

1) Store the various images in a subfolder

2) At Session_Start, work out which image is to be used and store its name
as a session variable

3) Use a MasterPage with an image control which is populated from the
session variable
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jan 8 '08 #2
Mark,
Assuming that the individual images are going to be the same size or very
nearly, I'd probably do the following:

1) Store the various images in a subfolder

2) At Session_Start, work out which image is to be used and store its name
as a session variable

3) Use a MasterPage with an image control which is populated from the
session variable
Yep, I had figured on all those. (Although for #2, I may just have a static
method the gets the image filename and have that method check if it's
already stored in a Session variable.)

I just barely came up with the idea of storing the image on disk instead of
in the database and was just trying to think it through. One concern is that
image files could get orphaned from deleted users but I could take steps to
check that.

Thanks.

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com

Jan 8 '08 #3

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

Similar topics

1
by: phatnugs420 | last post by:
Hi all, thanks for all your help last time.. Unfortunately I couldn't get any of the suggestions to work and because of time constraints I had to go to something that I knew worked... But I'd like...
0
by: Richard Silverstein | last post by:
I wonder if some graphics wiz out there can offer me a suggestion about how to improve the graphic display of my gallery description text (see http://www.pbase.com/richards1052/bali). While it...
20
by: Joe exCSSive | last post by:
Hi, folks: I'm back...and now I'm really stuck !! I have a graphic ( http://www.sundialontario.com/images/makeitatable.jpg ) that I would like to convert to CSS and I'm not sure how to do...
1
by: Peter | last post by:
Can someone show me an example of how to add a graphic to one or more days in the calendar control? I would like to add a plus sign graphic to each weekday in the calendar where use can click on...
2
by: David Scemama | last post by:
Hi, I'm looking for a way to display semi graphic characters in a multi line text control or in a rich text control. I've tried with all the characters of the extended ASCII table (code page...
1
by: hamil | last post by:
I am trying to print a graphic file (tif) and also use the PrintPreview control, the PageSetup control, and the Print dialog control. The code attached is a concatination of two examples taken out...
0
by: zxcv | last post by:
I have inherited an app that is using java to generate images that it loads into a PDF via external-graphic in XSL-FO. The problem I have is that my architecture environment is going to require in...
1
by: icepick72 | last post by:
On an academic note, I want to copy a Graphic to an Image (Bitmap). I have the Graphic object but not the origin image from which it originates; this is because I'm overriding the PrintDocument...
6
by: MLH | last post by:
I have a small bitmap graphic on a report. I would like to set it's Visible property to True whe the value of a certain field on the report is True. Can I do that? I have tried in the OnFormat...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
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,...
0
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...
0
Oralloy
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.