- see footer for list info -<
HI thanks for that Peter ....
I've done some googling and come up with this ....
style.css?version=1" type="text/css" />
Apparently putting the ?version on the end makes the browser refresh the
CSS. Saying that I can't get it to work though. There should be a picture of
an engine on the default page instead there's a picture of skynrd - aghhhh
..! damn cache thing ..!
I'll try the cf no cache thing and see what that does .... Alternatively I
thought about using cffile to rename the style.css each time an image is
uploaded.
Regards - Paul
From: "Peter Boughton" <[EMAIL PROTECTED]>
Reply-To: Coldfusion Development <[email protected]>
To: "Coldfusion Development" <[email protected]>
Subject: Re: [CF-Dev] Coldfusion & CS
Date: Mon, 27 Aug 2007 20:11:42 +0100
>- see footer for list info -<
>> Firstly can I use CF to create CSS parameters?
If the CSS file is parsed by CF, yes.
To get CF parsing the file, you could try associating CSS with the CF
server, but I don't like that method.
The better way would be to redirect specific files through a CFML proxy,
with a URL like this:
http://www.mydomain.com/style.cfm/something.css
Then you could have something like this as style.cfm:
<cfset StyleFile = REReplaceNoCase(CGI.PATH_INFO,'[^a-z0-9_-]',"_","all")/>
<!--- prevent any unwanted chars) --->
<cfset StyleFile = REReplace(StyleFile ,"\.+",".","all")/> <!--- don't
allow
more than a single sequential . in the filename --->
<cfcontent file="#Application.StylePath&StyleFile#" reset="yes"/> <!---
read
and display the file. --->
Where Application.StylePath is a global var definining where your
stylesheets are located. If you've got debugging enabled, you may want to
add a suitable cfsetting/cfabort combination after the cfcontent.
>> How do I either stop the image being cached or force the image to
reload?
Send a cache-control: no-cache header.
<cfheader name="cache-control" value="no-cache"/>
It might also be worth sending an expired cache notice too. You can google
for something along the lines of "http header cache prevent" to find out
more.
Depending on what you're changing, you'll need to do that with the image or
with the stylesheet - eitherway, you'll probably want to read more about
the
cfheader and cfcontent tags to get things working exactly as you want.
Hope that all makes sense?
On 8/27/07, Paul Swingewood <[EMAIL PROTECTED]> wrote:
>
> >- see footer for list info -<
> Can anyone help with this please.
>
> Firstly can I use CF to create CSS parameters?
>
> I have this ....
>
> /* Page Image */
>
> #page_image {
> width: 414px;
> height: 400px;
> background: url(../images/band.jpg) #09070a no-repeat 0px 100%;
> color: inherit;
> overflow: hidden;
> }
>
> I'd like to make the url bit a variable so that I can change it as
> required.
> Also when I do change this image (manually) it never appears. I take it
> this
> is a cache problem. How do I either stop the image being cached or force
> the
> image to reload?
>
> You can see what i'm trying to do here www.gunnrunner.co.uk
>
> Regards - Paul
>
>
> _______________________________________________
>
> For details on ALL mailing lists and for joining or leaving lists, go to
> http://list.cfdeveloper.co.uk/mailman/listinfo
>
> --
> CFDeveloper Sponsors:-
> >- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
> >- Lists hosted by www.Gradwell.com -<
> >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help
> -<
>
--
\ \
Peter Boughton
blog.bpsite.net
/ /
_______________________________________________
For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo
--
CFDeveloper Sponsors:-
>- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help
-<
_______________________________________________
For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo
--
CFDeveloper Sponsors:-
- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
- Lists hosted by www.Gradwell.com -<
- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<