Other users seeing a 3rd party website with same user stylesheet - css

I have a group of users that will be using a web database.
Ideally, I would like these users to view that website with some user styles of our creation (so that some of the website elements are displayed differently, like highlighting fields they need to fill out). These users are independent and remote, meaning that we can't really access their computers to do anything to set this up (like setting up Stylish for them).
I was wondering if we could somehow create a package that will display the website using such stylesheet, as if it was an application rather than a website that they visit with their browser.
The idea would be that by opening this "app" they're actually opening a dedicated browser window to this webpage where they can interact with it, can't navigate away (just no address bar), and uses this stylesheet I mentioned. Thus the "as if it was an app".
I hope I was sufficiently clear. I don't even know what this would be called (not even what tags to use), so my research has really taken me nowhere. Guidance on how to get this done will be highly appreciated. If somebody has a better idea of how to obtain a similar result, I'll be happy to experiment!!
Thanks!

Will the users be logging in through user accounts in your database?
If so, create a column in the user database which, should it return a certain value (say true for these special users and false for all else) then a different stylesheet is used.

Related

Web server instances?

Very newbie question, please forgive me:
I'm creating an asp.net website. I assume that when multiple people request the page each person gets a new instance of the site. However, if the site uses a .jpg image on the server and manipulates the image, does each person get an instance of the image also, or do they share the image somehow? I think I know, and that this is probably a dumb question, but I wanted to ask.
As an example: A user logs into the site, and adds times to a schedule. Depending on the schedule, a blue line is drawn on an image (grid.jpg), which depicts a daily timeline. The image is then saved as newgrid.jpg and displayed to the user. Is there a way for each user to get an instance of the image that only they can see?
A great way to generate dynamic images in ASP.NET is by using a Handler. The answer over here offers a good, simple example. In this scenario, the generated image never touches the local file system, it's just generated in memory, and returned to the client.
Well, usually the site is always the same for all users, but there are sessions created for each user with specific settings that you can set. So yes, all people will by default see the same changes (and the same content).

No data showing on Google Analytics due to Profile/Filter Configuration

I'm using the Google Analytics Flex API to record data from a Flex application.
As I understand it, Google Analytics has a 3-tier hierarchy: An Account can contain one or more Properties, each of which can contain one or more Profiles. A UA code is associated with a Property, and Filters can be used to record specific traffic to a specific Profile.
The application lives on 5 different server environments (development, staging, live, etc) and we need to separate the data from the different environments.
Note that the server environments do not live within the same domain name. For example, staging is at staging.x.com, but the live version is at www.y.com. But I want them all to share the same UA code, so we are tracking them as 5 different Profiles.
So I have one Property with multiple Profiles. I set up a Filter for each Profile saying "Include only traffic form the domains that are equal to" and the particular hostname for that server environment.
The "Default URL" for the Property is set to the hostname of the default Profile, which is the live environment.
We set up that configuration yesterday, and today there is no data in any of our Profiles. We had data the day before (before doing the reconfiguration). I am confident that the tracking code in the client app is sending the hits to GA, since I can see them in Chrome debug mode, and the client app wasn't changed between the day before yesterday and yesterday. The only thing that changed was the configuration of the Property and the Profiles.
So obviously I'm missing something about Property and Profile configuration. Some specific questions:
Am I understanding Filters correctly? Is it somehow applying the Filter to the entire Property? It seemed like the Filters were at the Profile level.
Does the "Default URL" for the Property have an effect on which hits are recorded? What exactly is it used for?
Is there some restriction on how the Profiles within a Property can be affiliated? For example, do they have to belong to the same domain name? I thought not, but maybe I'm wrong?
Any other suggestions?
Obviously, I can experiment with the configuration and see what happens. But I have to wait until the next day to see the effects of each change. Thanks for helping.
Am I understanding Filters correctly? Is it somehow applying the
Filter to the entire Property? It seemed like the Filters were at the
Profile level.
Yes Filters are always applied at the profile level.
Does the "Default URL" for the Property have an effect on which hits
are recorded? What exactly is it used for?
The "Default URL" has no effect on data collection or filtering at all. It's only used to create links from the page reports back to your site. So when you see the top page being /index.html and you click the little link beside it it will take you to "Default URL"/index.html . So you might break that specific feature if the url doesn't exist on you domain. But for the sake of reporting it's completely fine to use a different url.
Is there some restriction on how the Profiles within a Property can be
affiliated? For example, do they have to belong to the same domain
name? I thought not, but maybe I'm wrong?
No, the Profiles inside a Web Property don't need to share the same domain name. It's perfectly fine to have multiple profiles filtered by hostname and it's completely fine and normal to have a global profile with data from multiple hostnames. In that last case the data may be a little off unless you implement Cross Domain Tracking.
Any other suggestions?
It seems that you have a very good understanding of how things work in GA. One thing that you might have missed and #jk commented about is that you should always have an unfiltered profile on you Web Property to avoid losing data due to bad filters.
Another thing to notice is that in the past I had problems with the predefined domain filters. It seems they were being aplied to the wrong field inside Google Analytics. I think they were being applied to the "Visitor ISP Organization". For that reason I never use predefined filters. So if you are using predefined filters you might consider changing them to Custom Include fields, select the "Hostname" metric and enter the domain you want to filter as a RegExp. I believe this bug should be fixed by now, but you never know, I just lost confidence in the predefined filters on that day.
If you acidentaly used 2 include filters in a profile that filter on the hostname but with different values chances are they are canceling each other. So you might want to go into each profile and check if they only contain one include filter each.
eg:
Include only trafic from x.com
Include only trafic from y.com
This will result in a profile with no data.
Another thing to notice is that filters don't apply to retroactive data. So if you apply a filter today to a profile it will only filter data from now on. Data that has already been processed will be elft untouched. There's no way to change data that has been added to a profile, nor to add retroactive data to a new profile.
Other than that you are probably good.

How to take a screenshot of the user's screen when the user places an order?

I don't mind if it is a print screen or export proccess of the page to jpg or even to pdf... how can it be done?
Assuming you literally want to save a screenshot of the user's desktop, this can't be done with server-side technology like ASP, since the user's desktop is not on your server (obviously).
There might be a JavaScript solution (I couldn't find one), or you can use ActiveX (Take a screenshot of a webpage with JavaScript?), which might not be a good idea if this is a public ordering system, since many users won't be able to use (or will turn off) ActiveX--I know I'm personally alarmed to see ActiveX notification these days, and that would likely change my mind about placing an order in the first place.
However, I would very much question the need to take a literal screenshot, instead of just recording the relevant data in a database or log somewhere (and then you could simulate the user's screen).

IE not offering to save password of ASP.NET form

Sometimes Microsoft does something so stunningly dumb that it makes my head hurt. Help me find out it's really not the case ... please!
I've got an issue with the login page of an ASP.NET (3.5) site I'm developing whereby IE (7 or 8 ... can't bear to open 6) doesn't offer to save the password when a user logs in. I've checked other browsers and Firefox, Chrome and Safari all offer to save the password just fine. I've also confirmed that IE password saving on my test boxes is is working OK on other sites and for e.g. Google etc it works fine.
The searching I've done has turned up very little, but what little it did turn up seems to suggest that IE won't offer to save a password if the form on the page contains more than two text controls. That's the case with my form which also has controls to allow a user to register. And when I remove these additional controls, IE magically prompts to save password, so this does seem to be true.
Now ... if ASP.NET would allow me to have multiple forms, all would be well and I would be able to separate out the two functions into standalone forms and IE would prompt to save passwords. But, ASP.NET doesn't allow me to do this as it only allows a single form. I could fudge a non runat=server form in there and try to do this, but guess what? Because my page uses a MasterPage, any form tag I add is automatically stripped out, even if it's a non runat=server form.
So, I don't see any way around this without fundamentally changing what I was trying to achieve. It looks like I have to explain to my users that they won't be prompted to have their passwords saved if they use IE (a Microsoft product) because I developed my site with ASP.NET (err ... a Microsoft product).
If this is so, I just can't get over how head-smackingly ridiculous this is. If anyone can offer any ideas on how to get around it, can tell me I've got it all wrong and am a big, stupid idiot myself, or just wants to confirm that it's not just me that thinks this is monumentously dumb, then please, please do so.
Just for the record, I really don't want to (and don't see why I should have to) compromise my design and split my pages in two (which will result in a worse experience for the user).
#Chris That's what I went for in the end.
So for the benefit of anyone else, I still have my activation controls in a runat=server form and process these in the code for that page. Then I have a second, standard HTML form with HTML input textfields that posts to a different .NET page. This deals with the users login. I pick up the values in this page via Request.Form and deal with the login from here.
Upsides:
It all works and users get their logins remembered as they would expect to.
Downsides:
I lost the ability to use a MasterPage (as I need two forms in the page) so I effectively have had to duplicate the template - I don't like this much.
If the users login is invalid or causes some kind of error, I have to redirect to the initial page and pass it a flag to get it to show a relevant error message - I don't like this much either.
Like I say, though, it just works and in this case that's what was most important. Thanks for your input.

Using ASP.Net, is there a programmatic way to take a screenshot of the browser content?

I have an ASP.Net application which as desired feature, users would like to be able to take a screenshot. While I know this can be simulated, it would be really great to have a way to take a URL (or the current rendered page), and turn it into an image which can be stored on the server.
Is this crazy? Is there a way to do it? If so, any references?
I can tell you right now that there is no way to do it from inside the browser, nor should there be. Imagine that your page embeds GMail in an iframe. You could then steal a screenshot of the person's GMail inbox!
This could be made safe by having the browser "black out" all iframes and embeds that would violate cross-domain restrictions.
You could certainly write an extension to do this, but be aware of the security considerations outlined above.
Update: You can use a canvas utility function to get a screenshot of a page on the same origin as your code. There's even a lib to allow you to do this: http://experiments.hertzen.com/jsfeedback/
You can find other possible answers here: Using HTML5/Canvas/JavaScript to take screenshots
Browsershots has an XML-RPC interface and available source code (in Python).
I used the free assembly UrlScreenshot.dll which you can download here.
Works nicely!
There is also WebSiteScreenShot but it's not free.
You could try a browser plugin like IE7 Pro for Internet Explorer which allows you to save a screenshot of the current site to a file on disk. I'm sure there is a comparable plugin for FireFox out there as well.
If you want to do something like you described. You need to call an external process that prints the IE output as described here.
Why don't you take another approach?
If you have the need that users can view the same content over again, then it sounds like that is a business requirement for your application, and so you should be building it into your application.
Structure the URL so that when the same user (assuming you have sessions and the application shows different things to different users) visits the same URL, they always see same thing. They can then bookmark the URL locally, or you can even have an application feature that saves it in a user profile.
Part of this would mean making "clean urls", eg, site.com/view/whatever-information-needed-here.
If you are doing time-based data, where it changes as it gets older, there are probably a couple possible approaches.
If your data is not changing on a regular basis, then you could make the "current" page always, eg, site.com/view/2008-10-20 (add hour/minute/second as appropriate).
If it is refreshing, and/or updating more regularly, have the "current" page as site.com/view .. but allow specifying the exact time afterwards. In this case, you'd have to have a "link to this page" type function, which would link to the permanent URL with the full date/time. Look to google maps for inspiration here-- if you scroll across a map, you can always click "link to here" and it will provide a link that includes the GPS coordinates, objects on the map, etc. In that case it's not a very friendly url but it does work quite well. :)

Resources