Opencode-Collaborative-19 icon indicating copy to clipboard operation
Opencode-Collaborative-19 copied to clipboard

Prefetch participant images fixes #311

Open anupm12 opened this issue 6 years ago • 12 comments

  • Please fill out the template below

Did you read the instructions in README ?

Yes

Solves which issue ?

Fixes #311

Give discription.

Images are now being cached by the browser and the loading is comparatively faster now. All time it takes is to fetch data from json. I have made a script to fetch the images and prefetched that script using HTML.

Checklist

(To mark the checkboxes use x within the box brackets)

  • [x] Signed the code of conduct.

  • [x] Have you added yourself to the participants.

  • [x] Joined opencode zulip server.

anupm12 avatar Feb 03 '19 06:02 anupm12

@Anupam-dagar @ananya-agrawal please review this pr.

anupm12 avatar Feb 03 '19 06:02 anupm12

I'm not sure, but I think it works better in Firefox developer edition.

anupm12 avatar Feb 03 '19 06:02 anupm12

link

prateek76 avatar Feb 03 '19 10:02 prateek76

I'm sorry. I forget everytime 😅 live link https://preloadimages.netlify.com/

anupm12 avatar Feb 03 '19 10:02 anupm12

@anupm12 i can't see any impovement also in firefox it's taking more time than before

prateek76 avatar Feb 03 '19 15:02 prateek76

@prateek76 Let me check it

anupm12 avatar Feb 03 '19 15:02 anupm12

@pradeepgangwar @ananya-agrawal @prateek76 I have made use of prefetch HTML attribute and I read on StackOverflow that this attribute is not widely supported by browsers. Can you suggest me some alternative method to prefetch images folder or the participant.json file?

https://stackoverflow.com/questions/41655955/why-are-preload-link-not-working-for-json-requests

anupm12 avatar Feb 04 '19 16:02 anupm12

This is my code image

This is what it does image

I don't know if this is preloading or not.

anupm12 avatar Feb 04 '19 18:02 anupm12

@pradeepgangwar take a look at it.

Anupam-dagar avatar Feb 04 '19 18:02 Anupam-dagar

This is not the correct way to load image and assign. I see that in your script you are appending it in body tag. I will get back to this today evening.

pradeepgangwar avatar Feb 05 '19 07:02 pradeepgangwar

Ok @pradeepgangwar

anupm12 avatar Feb 05 '19 11:02 anupm12

@anupm12 Sorry for delay 😅 . I got busy with other things and completely forgot about this one. Let me check this.

pradeepgangwar avatar Feb 12 '19 21:02 pradeepgangwar