re-view
re-view copied to clipboard
Don't download all data for each view
I tried this plugin but it's not very usable in it's current state, as every single view does a full request to get all the data, instead of just parsing the CSS once and generating different views.
This is highly inefficient and also doesn't guarantee the same data is loaded for each request (for example: we do A/B testing and have certain conditions when popups show, depending on the request).
It would be great if the plugin could just download the data once and clone the one view with different dimensions instead.
Well, there’s actually no way to guarantee that content cloning will work. It’s possible to copy DOM from one frame into another, but since the origin of the document will be different, some resources might not load. I think it’s better to provide a query param to disable or control A/B testing during responsive design development. And since this plugin is primary for development, I don’t think that loading random content during development is a good idea.
I don't know the details of how the plugin works of course, but I'm not suggesting copying over the DOM, but to re-use all the downloaded assets, instead of doing new requests for each view.
I'm assuming (by your reply), that this plugin actually just creates new browser instances with different viewports?
It depends on your development environment, but there can be a good reason why we need to mimic production behaviour in our development environment, but I agree that some measures can be implemented to minimize randomization in content/assets.
Either way, I'll give it a shot in a local build and see if it's performant enough to be useful ;-)
I'm assuming (by your reply), that this plugin actually just creates new browser instances with different viewports?
No, it simply creates iframes with the same URL. It’s not possible to create browser instances via extension