[Plugin: ThickBox] Use <script> tags instead of str_replace
The way this plugins grabbing the JS files and using str_replace() is inefficient. It means WordPress is loaded once for each request. This makes the web server do *a lot* more work than is necessary.
Instead, it would be much more efficient to include the files as static JS/CSS files (no PHP parsing). Then, insert a <style> and <script> tag into the WordPress header on every page.
Insert this at wp_head:
Then take out those lines from the two static files.
On busy sites, this approach will significantly improve performance.
Cheers – Callum.
- The topic ‘[Plugin: ThickBox] Use <script> tags instead of str_replace’ is closed to new replies.