Optimization, SPeed, tracking and triggering the right pageload event
-
Huhu,
I'm on the finishing line of my new website, I just have to fix some issues to solve:
Triggering the right pageload event
My Navigation on the bottom is custom made, basically just boxes with links in it and I tried making the whole box clickable for convenience. The problem now is I feel like inserting a link through jquery or even through linking a website on a piece of text is triggering a different "loadpage" event than clicking on my project thumbnails or on clicking on a menu made with the laytheme menu tool. It's triggering a reload of the whole page which runs into issues (first: speed and it doesn't look nice, second: "about" is not opened as an overlay anmyore but as a split screen page on the right side.Is there any way to trigger the "laytheme version" of loading a new page with code?
Tracking the active project
If yes this would be very convenient as I think then it would also be possible to give the currently clicked portrait or menu point an "active" status and let it stay in color or inverted during the time the user stays on this menu point.Speed and reliability
Clicking on a project thumbnail changes the url in the browser immediately. Actually triggering the load of the page can take up to 5 seconds or not happen at all/just with another click on the project thumbnail. How to fix these issues? This actually makes being on the website not very enjoyable and unreliable. All photos have been resized by upload for long side 2500px and they are around 800kb in size. Carousels take a really long time to load as well but I guess this is more about size optimization with photos but I still think it's taking too long. I read in your guide about how to make the websites faster with choosing a hoster focused on speed. I'm at strato, didn't have any issues yet but ofc I cannot tell if it is something to do with the hoster and don't have anyone to do some testing with on a fster system tbh. But I feel like this souldn't be happening like that.THX <3
-
Is there any way to trigger the "laytheme version" of loading a new page with code?
Yes. look at the links that lay theme produces.
It is always a link with data- attributes and these are needed:data-id
data-type
data-title
data-catiddata-catid is a comma separated list of category id's inside []
data-catid is only needed for links to projects i think
i think u can also leave it out
i think its just for making sure menu points get an active styling if the menupoint is a category menupoint and the project that will be shown is part of that category -
Tracking the active project
If yes this would be very convenient as I think then it would also be possible to give the currently clicked portrait or menu point an "active" status and let it stay in color or inverted during the time the user stays on this menu point.You need to style things based on the body classes
https://laytheme.com/documentation/custom-css-styling.html#css-based-on-current-pageread this and watch the little video there too
-
Speed and reliability
Clicking on a project thumbnail changes the url in the browser immediately. Actually triggering the load of the page can take up to 5 seconds or not happen at all/just with another click on the project thumbnail. How to fix these issues? This actually makes being on the website not very enjoyable and unreliable. All photos have been resized by upload for long side 2500px and they are around 800kb in size. Carousels take a really long time to load as well but I guess this is more about size optimization with photos but I still think it's taking too long. I read in your guide about how to make the websites faster with choosing a hoster focused on speed. I'm at strato, didn't have any issues yet but ofc I cannot tell if it is something to do with the hoster and don't have anyone to do some testing with on a fster system tbh. But I feel like this souldn't be happening like that.yea thats too slow.
if u do all these steps:
https://laytheme.com/documentation/speeding-up-your-website.htmland then it is still too slow for your liking,
then its because of the serveralso make sure to disable all plugins you don't need
-
after u did these steps u can email post your website address here so i can also see why it might load slowly
-
THX!!! <3 This helped so much omg.
In the meantime and with your help I could fix everything and speed up my website although it's still not very ideal speed wise. I've looked into your guide and using a cache as well as CDN would require me to disable ajax/enable compatibility mode which on the other side would cause the website to basically reset every time I click something which on the split screen layout would look not very nice.
So I guess I've hit a soft cap of optimization where the only possible next step would be to either give up somoothness for speed with cache / disabled ajax or spend significantly more money on a host dedicated for speed?
This is my website now:
www.domenicdriessen.com -
:O
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it