- This topic is empty.
July 12, 2014 at 4:31 am #175280Shobhit_GeekParticipant
I am creating a site which has like 7-8 pages.I want to use the same custom font for all the pages.So what i am doing is that i am creating a css say temp_font.css and loading font in this using @font-face.Now my every page is having a reference of this css.When i switch between pages this css file would load again and again or the already loaded css would be used by the pages?July 13, 2014 at 11:24 pm #175358AnonymousInactive
I have a question along these lines. For a site of more than 7-8 pages, or even that, is just having one CSS file for all that can use the same one good practice? What if the file becomes damaged? Sure, there should be a backup but if each page has its own CSS file then any corruption would be to a single page and easily fixed by grabbing the CSS file of a similar page. Besides, just how long of a lag can an average CSS file have to download time and again?
Best Regards.July 17, 2014 at 12:00 am #175631maikelkoopmanParticipant
You can use one css file for unlimited amount of pages. because you download the css once with the first page load, the user doesn’t have download it again and again for every new page. It generally stays in the browser cache for at least a month or so, and the user will only see new css if the site changes the reference to the css in the document, eg change the file name OR they do a page refresh. There is no worry about a file being damaged, I have never seen this. So I wouldn’t worry too much about these things.July 17, 2014 at 12:30 am #175634AnonymousInactive
Greetings, and thanks for the reply.
I guess for a site of a few pages there might be an advantage to this, but I just don’t see that CSS would take such a long time to download, even if the same CSS was used for every page of a 20 – 30 page site (which would be unlikely if scrolling, slideshows, etc., were used on some) that there is any great benefit.
If a person makes only one CSS for all pages and makes a mistake on it when updating or changing it, then all pages are potentially ruined. If each page has its own CSS, whether the same as others or not, then one could easily be brought over from another file. Yes, a backup of a site and all files should be created, but that isn’t always done and if it is, changes to a site aren’t always backed up.
JMHO. Thoughts?July 19, 2014 at 7:00 am #175807July 19, 2014 at 11:08 am #175818Shobhit_GeekParticipant
Thanks for helping me guys!
It means a lot :)
- The forum ‘Other’ is closed to new topics and replies.