Skip to content
This repository has been archived by the owner on Jan 11, 2020. It is now read-only.

Prefetch participant images fixes #311 #351

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

anupm12
Copy link
Collaborator

@anupm12 anupm12 commented Feb 3, 2019

  • 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)

  • Signed the code of conduct.

  • Have you added yourself to the participants.

  • Joined opencode zulip server.

@anupm12
Copy link
Collaborator Author

anupm12 commented Feb 3, 2019

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

@anupm12
Copy link
Collaborator Author

anupm12 commented Feb 3, 2019

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

@prateek76
Copy link
Contributor

link

@anupm12
Copy link
Collaborator Author

anupm12 commented Feb 3, 2019

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

@prateek76
Copy link
Contributor

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

@anupm12
Copy link
Collaborator Author

anupm12 commented Feb 3, 2019

@prateek76
Let me check it

@anupm12
Copy link
Collaborator Author

anupm12 commented Feb 4, 2019

@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
Copy link
Collaborator Author

anupm12 commented Feb 4, 2019

This is my code
image

This is what it does
image

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

@Anupam-dagar
Copy link
Member

@pradeepgangwar take a look at it.

@pradeepgangwar
Copy link
Member

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.

@anupm12
Copy link
Collaborator Author

anupm12 commented Feb 5, 2019

Ok @pradeepgangwar

@pradeepgangwar
Copy link
Member

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants