Multiple FB share buttons on one page - loads SLOW - wordpress

I have a wordpress site that loads a lot of posts on one page and each post has a share button. When it gets to the share button it goes really slow and downloads and renders each button individually.Is there a way to only use one button and repeat it or streamline, cache the loading of these elements? Same goes for the twitter button, each button is a request from the server that the site has to wait to load.
Maybe I can cache the graphics or something?
Here's an example, http://www.anybarspecial.com/?gmw_post=specials&tax_days=43&tax_drink_types=0&gmw_address%5B%5D=&gmw_distance=3000&gmw_units=imperial&gmw_form=1&paged=1&gmw_per_page=50&gmw_lat=&gmw_lng=&gmw_px=pt&action=gmw_post

Related

Instantclick2 (not instantclick) issue

Thank you very much first of all for fixing instantclick, and removing unnecessary progress bar that helped to reduce size. This is a lot better than original instantclick. But I detected a few issues with instantclick2,
if you click a link a couple of times, this will reload the page or if server or internet connection is a bit slow, page reloads on clicking on a link.
page doesn't load instantly often. It is like, you clicked on a link, and then after a while it loads a new page or a post.
If you could work on this, completely disabling reloading page with multiple clicks and if it is possible to make pages load very instantly, this would be a great help for many people who use instantclick2.
With thanks,

Is it possible to update an iframe created by a Chrome Extension content script?

I have successfully created a toolbar Chrome Extension that, when a page is loaded, adds buttons and other content. These buttons can interact with the main page.
What I can't do is update those buttons when I change the state of my Extension - from the popup, for instance.
If background.js knows that a change has happened, can it communicate to the content script to tell it to update the iframe? Without updating the parent page on which it sits?
My content scripts are added to every iframe on page...so there are often 4 or 5 versions of content.js on a given page.
Any high-level guidance deeply appreciated.
Of course the user can just refresh the entire page to get the changes...but I'd prefer to have the iframe toolbar update without the user having to take that additional step.
You can message through background.js to reach the content script...
Then do the following in the content script when receiving a message from background.js:
$('#iframeID').attr('src', $('#annotatePROsidebar').attr('src'));

Mobile website in HTML5 not pulling CSS file until refreshed

I'm building a contact form for a mobile website in HTML5 and CSS. It is the same form I use on all mobile website and after not working for 5 hours I pulled the code straight from a working site I built and it still doesn't work properly.
The issue is when you go to the contact page it shows the contact form, but with the labels centered and the submit button image isn't showing up. I must refresh for it to bring up the correct CSS file to align the text left and show the submit button. Initially I thought it was from a CSS/JS conflict with my menu at the top so I pulled that and it still causes the same problem. I have cleared the cashe on my phone and web browsers and they all work the same.
Here is the link: www.lpokc.org/mobi/contact.php after going to this page hit refresh and you will see the difference.
My question is, is this a caching issue, is it server side issue, or is it a conflict in my coding. I'm not good with posting the code on this site but if you go to the mobile site from your web browser you can just right click and view source to see my code. I have a boiler plate html core file with boiler plate CSS and custom CSS.
Is there some sort of script I could use to make this page auto refresh one time on page load then not again after the reload? I don't want to use an improper fix like this but I have been working on this issue for a day.
The left side is before refresh. I have pulled the code from the site now but I think it was a js conflict because it was auto loading the css from the menu when the link for any page was clicked.
I'm seeing it fine on my end. Seems to work flawlessly, but if you are still having a problem, you could either use cookie or session variables. If the variable does not exist, you can use the php function header( 'Location: http://www.lpokc.org/mobi/contact.php' ) ; to "refresh" the page. It's actually just a redirect command, but if you are sending them back to the page they are on, it is pretty much the same thing as a refresh.
It was a conflicting issue with my menu JS/CSS. I pulled it and now everything works fine.

browser, navigation issues

This is basically a continuation of a question of mine from yesterday,
"Foregoing intialization on a page"
(And btw, kudos to all who give selflessly in this forum to help others - need to do more of that myself.)
So anyway, I was told about HistoryManager, BrowserManager and SharedObject, and so quickly ascertained that its no problem to store a few data items in a shared object so a flex page restores the previous configuration when the browser navigates back to it.
But my real concern would be speed of loading. Its a 15mb page and it only takes 2 seconds to load, but that's still not instantaneous. If it were in a tabbed browser and I just clicked on another tab containing my page, my page would then appear instantaneously. Is there any way to achieve that behavior when my page is navigated back to (via the browser back button for example.) Would that mean that the entire 15mb flex web page would have to be stored in memory.
Thanks.
Here's what I'm thinking, you're going the wrong way about this,(unless I missed the boad on what you want to acheive) what you need to do is work with javascript to interact with the browsers url. Thjis is assuming that you want to be able to go back on a page without reloading content.
Basicaly a java script would override the reloading, and when you hit back, the page doesn't reload, but the javascript notifies the flash what change in has occurred.
Have a look at the gaya framework for how they do it
or lookat http://www.robertpenner.com/experiments/backbutton/backbutton.html

Back button loop with IFRAMES

In my (school) website we use Iframes to display class blogs (on blogger). This works well EXCEPT if the user then clicks on (say) a photo inside the iframe. Blogger (in this case) then displays the photo in the whole browser window and the back button loops; that is if the back button is hit, the browser (IE, FF, Chrome) stays on the same page. The only way out is for the user to jump back two pages (which many of our users don't know how to do).
I've read a lot of posts on back buttons and iframes and there doesn't appear to be a simple solution. Bear in mind that I don't have control over the iframe content (so no embedded back buttons in the frame are possible). Ideas anyone?
The solution I would use would be to loop through the iframe content after it has been loaded and set target attributes on links in the iframe so that they open in either the iframe, or in a new window. Here's an example using jQuery:
$('#iframeID').contents().find('a').attr('target', '_blank');
You could do something similar using a loop and DOM methods, I'll post some code to do that if your not sure how to go about it.
EDIT: can't access the content if its cross domain, so this wouldn't work in this case

Resources