Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to selectively turn off CSS or Javascript features in Firefox/Chrome for testing?

IE has a handy debug feature that lets you emulate older versions of IE (7-10). Is there a similar feature as an addon for Firefox/Chrome that lets you, for example, turn back Chrome to only have the features it had a few versions ago? Or in Firefox test a site without the latest Firefox versions' CSS features? Or roughly show what a site would look like in IE7 by removing border-radius, shadows and advanced CSS effects, while not actually changing the stylesheets as loaded in the browser?

It seems effectively possible to remove JS features just on one page - for example, window.ArrayBuffer = undefined would cause lack of ArrayBuffer functionality as would happen in older browsers - but is there any addon, or api to write an addon, to go a step beyond "User agent switch" and remove features for testing?

like image 225
NoBugs Avatar asked Aug 23 '14 06:08

NoBugs


1 Answers

Is there a similar feature as an addon for Firefox/Chrome that lets you, for example, turn back Chrome to only have the features it had a few versions ago?

Use a feature called profiles to install and run multiple versions of the browser in parallel:

  • Mozillazine: Using Multiple Profiles

  • Chromium: Creating and Using Profiles

  • Opera: How to make multiple profiles?

These are more future-proof than the Microsoft solution:

Note You may be able to use legacy document modes to emulate the behavior of earlier versions. Should you choose to do this, be aware that this is a temporary solution at best. Starting with Internet Explorer 11 Preview, document modes are consider deprecated and may not be supported in any future versions of the browser. For best results, you should update your sites and apps to use features and techniques supported by industry standards and multiple browsers.

Note Starting with IE11, document modes are considered deprecated and should no longer be used. Webpages that require legacy document modes to display properly should be rewritten to use features defined by modern standards. To learn more, see Compatibility changes in IE11.

But have caveats:

Chrome profiles are not backwards compatible, so storing the user profile on a network drive and using it with different versions of Chrome can cause crashes and data loss.

References

  • Compatibility changes in IE11

  • IE10 Compatibility Changes

  • Specifying legacy document modes

  • When to use Legacy Document Modes

  • Understanding the need for document compatibility modes

  • HTML5 Parsing in IE10

  • IE 10 Compat Inspector

  • IE 10, HTML5 and jQuery 2.x - JavaScript runtime error: 'JSON' is undefined

  • Interoperable HTML Parsing in IE9

  • Compatibility View and 'Smart Defaults'

  • Chromium: Supported Directory Variables

like image 124
Paul Sweatte Avatar answered Nov 15 '22 07:11

Paul Sweatte