I was thinking about this recently, and it would be a good feature to have, but please confirm if this is truly impossible.
It won't work because I believe rails reads the system timestamp on the image files it directly serves from the html.erb files, and since the .css files made from .sass are generated on the localhost, it would be impossible to know what the prod server timestamp is for its images. I would definitely like to be wrong, because when I have my images served via css, people have to refresh the browser to see the new images. Ramon On Mar 4 2007, 5:31 am, "Tomislav Filipčić" <[EMAIL PROTECTED]> wrote: > Browsers will reload the stylesheet because thetimestampwill change, > but I'm not asking for this, because rails already does that with it's > stylesheet_link_tag helper. > > When asset images are modified the application will be restarted after > redeployment and sass will then update the stylesheet, right? So it > could be possible, maybe as an option (defaulted to off). This would > give sass an edge over css in rails, as well enable people to save > bandwidth and server hits on the graphic elements of their web > applications. > > On Mar 3, 9:08 pm, Nathan Weizenbaum <[EMAIL PROTECTED]> wrote: > > > There are a few issues with this. First, browsers already cache CSS > > pages, so there's no guarantee that they'd notice the updated > > stylesheet. Second, Sass only updates the stylesheet whenever the > > template has been updated, which is what allows it to be so fast, but > > also means that modifying the image would probably go unnoticed for a while. > > > So this probably isn't feasible. Sorry. > > > - Nathan > > > Tomislav Filipčić wrote: > > > In rails when using the image_tag and stylesheet helpers a asset > > >timestampnumber is appended to the URL (image.jpg?543563463). This > > > helps with caching the assets, you just set them to expire in x years, > > > and when the file changes thetimestampalso changes and the users > > > will request the new file. > > > > Could sass do this with images in CSS too? > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Haml" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/haml?hl=en -~----------~----~----~----~------~----~------~--~---
