If you give the cookie a long lifespan, you won't need the extra formatting preference stuff on the end of the URL.
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Michael Schuerig Sent: Thursday, July 16, 2009 1:04 AM To: [email protected] Subject: [Rails] Re: How to dynamically change stylesheets globally? On Thursday 16 July 2009, Patrick Doyle wrote: > The one issue with keeping the state in the session is that it makes > it much more difficult to bookmark the :large_fonts version of the > page. By appending ?fontsize=large&contrast=normal to every link, the > end user can easily bookmark the page with the correct settings. You could use all these mechanisms in some order. First, check the URL, then check the cookie, or the other way round. Unless your stylesheets are prohibitively large, I suggest you don't actually switch stylesheets. Instead, set the class of the BODY element and and add the appropriate classes to your style rules. Michael -- Michael Schuerig mailto:[email protected] http://www.schuerig.de/michael/ GHC Confidentiality Statement This message and any attached files might contain confidential information protected by federal and state law. The information is intended only for the use of the individual(s) or entities originally named as addressees. The improper disclosure of such information may be subject to civil or criminal penalties. If this message reached you in error, please contact the sender and destroy this message. Disclosing, copying, forwarding, or distributing the information by unauthorized individuals or entities is strictly prohibited by law. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" 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/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

