|
| |
|
|
mtfm
Posts: 421 Joined: 1/13/2006 From: Mesa, AZ Status: offline
|
A List Apart Alternate Stylesheets and MS Word - 8/1/2007 13:08:43
I use alternate stylesheets, and because my company uses IE6, I have to use a workaround so that they are viable. I have been using this page from A list apart and it has been working nicely. Now, I was messing around with something, and noticed that when an end user hits the button to "edit this page with MS Word" that MS Word only takes the first stylesheet listed. Because I have a couple of pages with "sensitive" information-- I was wondering if I could use this to my advantage and declare a "fake" stylesheet for MS Word, so that when Word pulls the page I can "hide" information from it word. I already can hide it from being printed, but it is so easy to import into word and print from there. Now, since the normal cascade is that the last one declared is used (rather than MS Word where the first one is used) it shouldn't affect anything else. Anyone see problems with the below code? It validates, and seems to work, but I just wanted to make sure from an accessibility point of view that it wouldn't mess something up.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Title Goes Here</title>
<link rel="stylesheet" type="text/css" href="stylesheet_for_printing.css" media="print">
<link rel="stylesheet" type="text/css" href="stylesheet_for_msword.css" title="MSWord">
<link rel="stylesheet" type="text/css" href="stylesheet1.css" media="all" title="standard">
<link rel="alternate stylesheet" type="text/css" href="stylesheet2.css" title="stylesheet2">
<link rel="alternate stylesheet" type="text/css" href="stylesheet3.css" title="stylesheet3">
<script type="text/javascript" src="styleswitcher.js">
</script>
</head>
_____________________________
Is this possible? How about this? What about....?
|
|
|
|
Tailslide
Posts: 5948 Joined: 5/10/2005 From: Out here on the raggedy edge Status: offline
|
RE: A List Apart Alternate Stylesheets and MS Word - 8/1/2007 14:54:03
What sort of info are you trying to hide? It seems like a lot of trouble to go to when all the info can be "got at" by someone who really wants it. What I'm trying to get at is that as you can't stop them getting at the information, is there a point to stopping people downloading it with Word? To be honest I've never noticed that Word does this - I'd be really careful about testing in other browsers to make sure they're not somehow picking up the Word stylesheet by accident. Since I'm here - do you mind if I ask why you're using an stylesheet switcher for IE6 when you could use conditional comments instead (easier to manage imo).
_____________________________
"My strategy is so simple an idiot could have devised it" Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project
|
|
|
|
mtfm
Posts: 421 Joined: 1/13/2006 From: Mesa, AZ Status: offline
|
RE: A List Apart Alternate Stylesheets and MS Word - 8/1/2007 15:07:20
I work for a large company, and this content is going on the intraweb, where the only browser it is seen by is IE6. I use alternate stylesheets just so that the users can change colors, text size, etc. (most users are not computer-savvy enough to change text size on their own, but understand "click this button to get bigger text!") As to the information I am trying to 'hide" I am not trying to make it truly unavailable, just somewhat limited in distribution. The intraweb is behind a firewall, meaning that no one outside the company can get to it. But some people (in the sales force) will print out procedures and whatnot, or otherwise "borrow" content to use in their presentations to the customer, contents which are supposed to be for internal use only and are not suitable for the customer. I am simply trying to throw enough obstacles in their way so that there is absolutely no way possible they can obtain this information without some effort and without realizing they shouldn't be doing so. I am well aware that if someone wants it bad enough they can get to it.
_____________________________
Is this possible? How about this? What about....?
|
|
|
|
Tailslide
Posts: 5948 Joined: 5/10/2005 From: Out here on the raggedy edge Status: offline
|
RE: A List Apart Alternate Stylesheets and MS Word - 8/1/2007 16:57:24
quote:
ORIGINAL: mtfm But some people (in the sales force) will print out procedures and whatnot, or otherwise "borrow" content to use in their presentations to the customer, contents which are supposed to be for internal use only and are not suitable for the customer. Damn sales people! I can understand what you're getting at now and understand the switcher use (thought it was just because of IE6 rather than to provide alternate presentation). It's interesting - didn't realise that Word does this and if IE6 is the only browser available then you shouldn't be running the risk of messing up the site - I'd try to get hold of IE7 and just check it's ok in case of upgrades though. I remember when I used to use this switcher method it was an eternal pain in the arse getting it to work right in different browsers!
_____________________________
"My strategy is so simple an idiot could have devised it" Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project
|
|
|
|
mtfm
Posts: 421 Joined: 1/13/2006 From: Mesa, AZ Status: offline
|
RE: A List Apart Alternate Stylesheets and MS Word - 8/1/2007 19:17:53
UPDATE-- with Javascript turned off, both IE and various Office products want to grab the same stylesheet-- so this doesn't degrade nicely. It works well with JS on, and the alternate stylesheet script works-- but with JS off it all falls apart. And trying various combinations of media types only makes IE either ignore the stylesheets or pull from two or more, which is an interesting experiment to say the least, but NOT something I even want to tackle. So it looks like I either have to have something that doesn't degrade well, OR just deal with it. And if I'm going to do the first, it's a lot easier and safer to just have a JS include using document.write, Office doesn't appear to pick up on those. Anyway...
_____________________________
Is this possible? How about this? What about....?
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|