Hiding actual window size - privacy

I have a problem that requires me to hide/change the actual window size of my browser from the web server. I mean the web server should learn wrong information about my actual agent window size. For instance, If my actual window size is X * Z, the server should read it as X/4 * Z/4. Is this possible?
Note: I do not want to use headless browsing or any other detectable technique. I just want my normal web browser to hide its actual windowsize information.

The server can't interrogate the browser, but a script running in the browser can obtain those details and send them to the server. However, even then, you can't control what the browser does, even knowing that information. What you describe sounds just like the mobile testing modes in most browsers, and any script running those modes will report the "faked" screen size to the server via such scripts. In chrome, show dev tools, click this icon:
Then at the top you can select different screen sizes, including a bunch or presets and orientations:
Any script running in that mode will report the emulated size.

Related

how to prevent user when opening a new tab,minimising,maximising in browser using javascript jquery

I have to restrict the user of opening new tab,minimizing or opening another browser while running a web page.
Is there any way for me to make this happening?
One liner answer, you can't. You can control your page certain extend programmatically by restricting resize of the window or make it full screen but you can't restrict users minimizing or opening another browser while running a web page.
Click here for details of browser full screen mode programmatically, this full screen mode provides an illusion of restricting of another browser opening by hiding the options. But that's not the case, once user exit from full screen everything will be back in original state, so users can perform minimizing or opening another browser or a new tab.

Cross browser Testing

Due to Bootstrap upgrade, there has been lots of changes in the CSS in all pages of the web application that I'm working on. This application is also mobile optimized. So I have the task the checking the UI of all pages of our application accross most browsers - IE8,9,10,11 , chrome, firefox, ios and android devices(phone, 7 inch, 10 inch).
Right now, I'm opening the existing version(old bootstrap) and the updated version(New bootstrap) of my website in 2 tabs, and switch back and forth between them to find out any UI issues like alignment and color change and text size.
Is there a better way of doing this?
Yes there are somewhat solutions to it, which make cross-browser and multiple device testing easy. Some of them are:
Ghostlab: allows synchronized testing which means if you click or scroll in one browser it happens across all browsers. It has many other features but is only for Mac.
Grunt also allows for synchronized testing. Check this article
you can do cross browser testing within a browser using online services such as
Last thing I would mention is xip.io just check it out!!!
Chrome DevTools are awesome for this purpose. They allow you to override settings for different devices by Developer Tool>Settings>Overrides you can override following to emulate
User agents
Device metrics
Device orientation
Touch events
CSS media

Debugging web application from Visual Studio using a specific screen resolution

I would like to know if there is the possibility to set screen resolution when debugging web application.
For instance, I usually work with a 1600x900 screen size, but the customer requirement is fixed on 1024x768 resolution.
My desire is to start debugging in the browser setted to this resoluton, for the time of the debug.
Is it possibile ? Or there is some tool that allow this kind of behaviour ?
Thanks
You can try a browser plugin like https://addons.mozilla.org/en-US/firefox/addon/web-developer/ that will allow you to quickly change the resolution of the the browser your are debugging in. There's one for Chrome too (https://chrome.google.com/webstore/detail/idhfcdbheobinplaamokffboaccidbal) and I'm sure other browsers allow you to do this too.
This may not work automatically, but you can quickly switch back an forth between resolutions.
You can leverage the Windows API to try to set screen resolution from your program, if the DEBUG constant has been defined: http://dotnet.mvps.org/dotnet/faqs/?id=setscreenresolution&lang=en. However, if you have to terminate the debugger, your screen will remain set to the debug resolution. You also shouldn't release the "debug" configuration of your app without first commenting out the resolution change.
Usually, changing the screen res is something a desktop app should never do. However, it makes a certain amount of sense here, so just make sure the released builds don't do this.
Firefox offers a plug-in to test a website in different resolutions, but this is just testing it with one particular browser. http://www.makeuseof.com/tag/3-firefox-plugins-test-website-resolutions/

Screen resolution

how can I replace screen resolution when accessing some site from script? Is it possible to acces such data when own script connects to the server?
To give a very definitive answer:
You cannot change a user's screen resolution via the browser.
You cannot retrieve a user's resolution as part of any ordinary HTTP request. (i.e.: in PHP's $_POST superglobal)
You can retrieve a user's screen resolution using JavaScript, which can then be passed back to the server via AJAX.
As a best practice, your website should be resolution independent by means of a fixed, fluid, or elastic layout. Changing a user's resolution is a frustrating experience for users and makes a project operate badly.
Keep in mind, also, that many platforms cannot have their resolutions altered. Most mobile devices, embedded platforms, and video game consoles have fixed resolutions. Also, projectors and televisions usually have very specific resolutions at which they function properly, so adjusting the resolution on these devices would likely wreak havoc.
As an alternative to adjusting screen resolution, check out em-driven layout. An em is a unit of measure in CSS that is relative to the current font. This allows you to dynamically adjust the sizing of your layout and its contents by adjusting the font size of the document (a larger font size will increase the pixel-for-pixel sizes of everything else on the page).
It should be noted that adjusting resolution can be accomplished via ActiveX on Windows, but only after multiple security warnings (and it only works on Windows in IE). This should not be attempted under any circumstances.
Here is my answer if I understood your question correctly. It is not possible to change screen resolution for a user when he/she accesses your site.
Are you saying that the site is changing its behavior based on what it thinks the user's screen resolution is? That's a) bad behavior, and b) client-side, so done with JavaScript or an ActiveX control or the like.
If you want your script to mimic that, it'll have to interpret the JavaScript, run the ActiveX, or whatever.
Sites don't have their own "screen resolution". They're rendered to whatever size the browser is at. That's part of the beauty of HTML.

Strange Flex Sizing in IE on Server2003

I have a modified version of a flex calendar found Here, and though it looks alright on most computers I've seen, there is a problem on two of the three servers here. Because of the way Citrix is setup here, I need to have it functional on all of the servers.
When it loads, everything is stretched out vertically, and the numbers are missing on the date boxes. If you mouse-over the flex buttons, they jump to the right size, but there is still rendering errors.
The modifications I made had no effect, because the servers give the same results on both my version and the demo version hosted online. As far as I can tell, the servers are identical (IE version, Flash version, etc.)
How can I get it to display normally?
Initial View
After Mouseover
Usual Demo
Demo in bad server
Edit: On the server that renders it improperly, Firefox renders it fine, but Firefox cannot be used for other (unchangeable) reasons.
From the images it appears this is how the SWF appears in the Browser of each server - one good and one bad. Not how the SWF appears in any browser while being hosted from each server.
Sense it is the browser display that is not working correctly I would assume it is a rendering problem with the browser and not the server.
1.) The problem could come from JavaScript being disabled in one of the browsers and the view being taken from the embed tag. Check to ensure that it looks the same with JavaScript both on and off.
2.) The height being 100% could also be messing it up in the browser. Try setting the height to a specific value (800px) and see if that corrects the problem.
3.) Make sure that the browsers are the same. Is one IE 7 and one IE 8? If they are the same, check the version number to ensure that all updates are the same for each.
4.) View the site from another computer that is connected to the server.
Number 1 and 2 would be my best guess as a way to troubleshoot.

Resources