I am in the process of converting my application to use XHTML strict mode (it didn't have a DOCTYPE before). However, I noticed a significant degradation when getting offsetHeight/offsetWidth. This is very noticeable on pages with large number of DOM elements, let's say a table with 1 column by 800 rows, the cells only have a piece of text. Visiting each descendant element in that table to obtain their offset dimension is way slower than when IE renders the page in Quirks mode. Why is that the case? and does anybody know tips to help IE calculate those offsetValues?
IE 8 Quirks vs Standards retrieving offsetHeight/offsetWidth
5.6k Views Asked by Paul At
2
There are 2 best solutions below
0
Paul
On
@bobince: The issue I believe is around reflow. The logic in my JavaScript tries to figure out if children are overlapping each other (since they get dynamic content that I can't predict) in an absolute layout container and then adjusts the parent's css dimensions and sibbling's css that need to shift down. Changing the css dimensions trigger reflow and this happens in the middle of my iteration, this scenario seems to be much slower in IE8 standards than in IE8 Quirks for very large tables. I know that I should hide or use documentFragment when doing this type of operations, however because I need things to move and then look at the new offset dimensions I was getting inaccurate values.
Related Questions in JAVASCRIPT
- Using Puppeteer to scrape a public API only when the data changes
- inline SVG text (js)
- An array of images and a for loop display the buttons. How to assign each button to open its own block by name?
- Storing the preferred font-size in localStorage
- Simple movie API request not showing up in the console log
- Authenticate Flask rest API
- Deploying sveltekit app with gunjs on vercel throws cannot find module './lib/text-encoding'
- How to request administrator rights?
- mp4 embedded videos within github pages website not loading
- Scrimba tutorial was working, suddenly stopped even trying the default
- In Datatables, start value resets to 0, when column sorting
- How do I link two models in mongoose?
- parameter values only being sent to certain columns in google sheet?
- Run main several times of wasm in browser
- Variable inside a Variable, not updating
Related Questions in INTERNET-EXPLORER
- VBA, Internet Explorer and Javascript
- Inefficient driver.get() performance in Loops with IEDriver
- NEXT JS -unpecified error on ecternal calls
- Internet Explorer fails to launch via Selenium
- IE Mode Edge driver stuck on 'This is the initial start page for the WebDriver server' when running in Elevated Mode (Admin Mode) [Selenium]
- Can open new window in different browser?
- unable to get the right object to set the windowState
- Filters to apply for an application that can only run on IE compatibility
- How to accept popup message from Edge in IE mode Python - Selenium
- Does anyone know why i cannot see the source code of a website while in Internet Explorer mode in Microsoft Edge?
- Protected Mode settings are not the same for all zones (SELENIUM) (IE MODE IN EDGE)
- Browser Compatibility for WebTransport
- Internet Explorer don't POST
- Microsoft Edge API and IE Mode
- Close security screen alert Internet Explorer Pop-up using VBA and Windows API
Related Questions in HTML-PARSING
- Can we style html tags with flutter_widget_from_html package
- How can we remove or escape garbage value like =3D or =3D&"e while parsing mhtml or html page using jsoup?
- how can i get website html code using requests?
- React js parse with content between html strips
- IMPORTXML: how to scrape NBA logos from a webpage (with Google Sheets)
- how to get table from site github.com with Cheerio google app script
- Want to retrieve data from files located within a SharePoint folder path
- python: parse html document with UNNESTED div tags into dataframe (using beautifulsoup)
- Trouble finding Youtube view count
- why does it not work to replace from local file's config?
- Python oneliner to remove tags from chuncks of HTML codes
- I am trying to open and html file with bs4 and i get this error
- why part of content disappear magically
- how to fix Error The markup in the document preceding the root element must be well-formed
- How can I get needs html from site?
Related Questions in OFFSETWIDTH
- .offsetWidth in wkhtmltopdf not working as expected
- ERROR: cannot read properties of undefined (reading 'offsetwidth')
- I would like to set the size of the text to be dynamic/flexible depending on the window size with Javascript
- OffsetWidth is always '0'
- Observe size change of element
- How to take immediate / offset bits for C.LD compressed instruction in RISC-V?
- How to apply conditional column offsets in IONIC 3
- Calculate scrollbar width using LESS?
- Wait on element resize done after changing width trough renderer
- Why am I getting a cannot read property message in my console when I try to use children property and offsetWidth?
- Why is my clientWidth and offsetWidth equal?
- Why do I get difference in offsetheight and offsetwidth values when I emulate my web application from IE5 to IE7 or higher?
- Trying to get width of element inside .each()
- D3 cannot read property offsetHeight of null
- How to get only Visible Elements using document.getElementsByTag and document.queryselectAll
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I would suggest to force IE to render you page in standards mode not in quirks. This can be done by adding a meta tags on the head of your html document or setup the web-server to add X-UA-Compatible headers.
Also, use built-in javascript frameworks such as jquery,prototype, yui, etc, most be of them already addressed the issues on different rendering engines.