janodvarko / harviewer

HAR Viewer is a web application that allows visualizing HTTP Archive logs (HARs)
http://www.softwareishard.com/blog/har-viewer/
1.04k stars 184 forks source link

How to customize the harPreview #132

Open syndy1989 opened 6 years ago

syndy1989 commented 6 years ago

I embedded harviewer in to my html page to load the har files from my local machine. It works fine. but when i expand the resources and navigate through the tabs (Response, Highlighted, JSON) it just hangs and my html page is getting refreshed and at times become unresponsive. Is there any way to disable the ability to expand the resources.

Please find the below screenshot for desired output: error

Any advise on how to achieve this would be really helpful. Thanks in advance.

gitgrimbo commented 6 years ago

The primary issue here is customising the preview so that the resource rows are not expandable, I can look into this.


But you also include a separate issue which sounds like a bug. However -

I don't see the "Response, Highlighted, JSON" tabs hanging when I try this, see:

https://github.com/janodvarko/harviewer/issues/130#issuecomment-434629297

Can you confirm that using the http://gitgrimbo.github.io/harviewer/issue-130/examples/embed.html page with your HAR file causes an error, because I can't see such an error (the screenshot accompanying the comment above shows the embed page working normally with your HAR file, served from localhost).

syndy1989 commented 6 years ago

When we have less number of network request it works fine . I tried with some sample url which has 310 n/w request. Please find the below screenshot. the page just hangs unresponsive

so all i need is to remove the response tab. Any advise on how to do that would be helpful. Thanks

gitgrimbo commented 6 years ago

I am using your har.har from #130 which has 311 requests. And using Firefox (63.0) as I assume that is the browser you are using.

I can see a slowdown when using the "Highlighted" tab because SyntaxHighlighter (used in HAR Viewer) is quite slow for large files, e.g. the large show_ads_impl.js file (below I have clicked on the "Highlighted" tab, but it takes a long time, so Firefox has shown the warning - this is also slow in Chrome):

image

If any other tabs give you a slowdown then let me know, otherwise the "Highlighted" tab is known to slow down for large resources.

A previous fix for #81 was to have a separate "Highlighted" tab so that you can choose if you want to view the resource with syntax highlighting. If you don't want a slowdown, then the only advice at the moment is to not click on the "Highlighted" tab.

The "Response" tab should not be slow. If it is, then please raise a separate issue with an example.

syndy1989 commented 6 years ago

I replaced the css and js files as suggested. It is working perfectly. Thankyou

gitgrimbo commented 6 years ago

Cool, will leave this open for now as a general issue for customising the preview.

A new issue has been raised to track syntax-highlighting slowdowns, #135.

gitgrimbo commented 6 years ago

See #137 for new syntax highlighting.